Add Multiple Columns to a Table in a Single Statement in Oracle SQL

In Oracle, you can use the ALTER TABLE command to add columns to a table after it’s created.

The command also allows you to add multiple columns in the one statement.

The way to do this is to enclose all of the columns in brackets and separate the columns by a comma.

For example:

ALTER TABLE yourtableADD (  middle_name VARCHAR2(100),  hire_date DATE,  insurance_id NUMBER(6));

This means all the columns will be added in a single statement, reducing the amount of code you’ll need to write.

Share the Post:
Share on facebook
Share on twitter
Share on linkedin


Recent Articles: