SQL Oracle PHP Java JSP JDBC MORE
Need a Website Or Web Application Or Any Help.Contact Us: +91 9437911966 (Whatsapp) Note: Paid Service

SQL Alter Statement


To add, delete, or modify columns in an existing table. The ALTER TABLE statement is used.

SQL ALTER TABLE Syntax

To add a column in a table, the syntax is

ALTER TABLE table_name
ADD column_name datatype

To delete a column in a table, the syntax is

ALTER TABLE table_name
DROP COLUMN column_name

To change the data type of a column in a table, the syntax is

ALTER TABLE table_name
ALTER COLUMN column_name datatype

To change the data type of a column in a table My SQL / Oracle (prior version 10G):

ALTER TABLE table_name
MODIFY COLUMN column_name datatype

To change the data type of a column in a table Oracle 10G and later:

ALTER TABLE table_name
MODIFY column_name datatype