Add Column in Oracle | Oracle Alter Table Syntax example | Add columns to a Table | Alter Table statement in Oracle | Oracle Documentation | How to Add column in Oracle Table


Add Column in Oracle Table

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_ishan  varchar2(1) NOT NULL;

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

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

Post a Comment

Previous Post Next Post