TRENDING TOPICS

×

How to alter table in SQL?

By: Sirirat Burrows | 10 July 2019

A

Abhijeet Kumar

28 January 2020

Definition of Alter Table in SQL


Basically, There are three queries like ADD, DROP, and MODIFY used to Alter the table in SQL. ALTER query is used to change TABLE_NAME, COLUMN_NAME. It will work if the tables and columns are created already. Trying to mentioned SQL query syntax to alter a table below check it one by one:



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

Advertise With Us

We offer sponsored posts and guest posts with do-follow links, back-links, and other advertising services, To advertise email us at "advertise@gdatamart.com"

© 2021 GDATAMART.COM (All Rights Reserved)