Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.

Tip of the Day
Language: SQL
Expertise: Beginner
Mar 6, 2017



Application Security Testing: An Integral Part of DevOps

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 yourtable
  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.

Ben Brumm
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.
Thanks for your registration, follow us on our social networks to keep up-to-date