ALTER TABLE STATEMENTS

SQL ALTER TABLE Syntax

Add a column in a table, use the following syntax:

        ALTER TABLE table_name
        ADD column_name datatype
 
Delete a column in a table, use the following syntax (notice that some database systems don't allow deleting a column):

        ALTER TABLE table_name
        DROP COLUMN column_name
 
Change the data type of a column in a table, use the following syntax:

1) My SQL / SQL Server / MS Access:

ALTER TABLE table_name
ALTER COLUMN column_name datatype
 
2) Oracle:

ALTER TABLE table_name
MODIFY column_name datatype
 
 
You can try it... 
Hopes it will helps you

Comments

Popular posts from this blog

Add Serial no in crystal report without coding

File operations in C# (.net)

Working with Oracle's BLOB and Microsoft's C#