Syntax 1
To add a column to an existing table, the ALTER TABLE syntax is:
ALTER TABLE TableName ADD ColumnName column-definition;
For example:
ALTER TABLE yourtable ADD yourcolumn varchar2(50);
This will add a column called yourcolumn to the yourtable table.
Syntax 2
To add multiple columns to an existing table, the ALTER TABLE syntax is:
ALTER TABLE TableName ADD ( column1 column-definition, column2 column-definition, ... columnn column_definition );
ALTER TABLE yourtable ADD ( yourcolumn1 varchar2(50), yourcolumn2 varchar2(45) );
This will add two columns (yourcolumn1 and yourcolumn2) to the yourtable table.
Remember Me
Powered by: www.ie-soft.de
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.
© Copyright 2010, Manuel Trunk
E-mail