TRENDING TOPICS

×

How to alter table in SQL?

By: Sirirat Burrows | 10 July 2019

A

Abhijeet Kumar

28 January 2020

Basically, we use three (ADD, DROP, and MODIFY) to Alter Table in SQL. ALTER is used to change TABLE_NAME, COLUMN_NAME; if the tables and columns are created already. The syntax mentioned below:


ALTER TABLE - ADD COLUMN

    ALTER TABLE table_name

    ADD column_name datatype;

ALTER TABLE - DROP COLUMN

    ALTER TABLE table_name

    DROP COLUMN  column_name;

ALTER TABLE - MODIFY COLUMN

    ALTER TABLE table_name

    MODIFY COLUMN column_name datatype;

0 votes

Your Answer

© 2021 GDATAMART.COM (All Rights Reserved)