JointLantic

alter table

The oracle alter table statement by pl sql is used to add column, modify, or drop/delete columns in a table. The oracle alter table statement is also used to rename a table.

alter table to add column in table oracle

Syntax

how to use pl sql alter table to add column in table, the oracle alter table syatnx is:

Example 1:

alter table PS_JS_EX_PART2 add COMPANY_DESCR VARCHAR2(30 CHAR);
/
alter table PS_JS_EX_PART2 add KTB_TAX_ID VARCHAR2(15 CHAR);
/

Example 2:

 add multiple columns in table

Syntax

In this syntax, you separate two columns by a comma

Example 3:

Modify column in table

Syntax

Example 4:

Modify Multiple columns in table

Syntax

Example 5:

Drop column in table

Syntax

Example 6:

Rename column in table (NEW in Oracle 9i Release 2)

Syntax

Example 7:

Rename table

Syntax

Example 8:

Exit mobile version