ORACLE – Alter Table – Add Column


We have “alter table” syntax from Oracle to add data columns in-place in this form:

alter table
table_name
add
(
column1_name column1_datatype column1_constraint,
column2_name column2_datatype column2_constraint,
column3_name column3_datatype column3_constraint
);

Here are some examples of Oracle “alter table” syntax to add data columns.

alter table
cust_table
add
cust_sex  varchar2(1) NOT NULL;

Her is an example of Oracle “alter table” syntax to add multiple data columns.

ALTER TABLE
cust_table
ADD
(
cust_sex             char(1) NOT NULL,
cust_credit_rating   number
);

source:

http://www.dba-oracle.com/t_alter_table_add_column_syntax_example.htm

2 thoughts on “ORACLE – Alter Table – Add Column

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s