Tag: SQL – How To Alter SQL Table?


  • SQL – How To Alter SQL Table?

    SQL – How To Alter SQL Table?

    SQL – How To Alter SQL Table? Table Of Contents: What Is Altering A Table? Syntax Of Altering A Table. Examples Of Altering A Table. (1) What Is Altering A Table? The ALTER TABLE statement is used to add, delete, or modify columns in an existing table. The ALTER TABLE statement is also used to add and drop various constraints on an existing table. (2) Syntax Of Altering A Table? Adding A Column: ALTER TABLE table_name ADD column_name datatype; Dropping A Column: ALTER TABLE table_name DROP COLUMN column_name; Renaming A Column: ALTER TABLE table_name RENAME COLUMN old_name to new_name; Modifying Datatype Of A Column:

    Read More