Wednesday, June 19, 2013

How to add more columns to an existing table with a simple SQL in Oracle

Most of you may know that you can add a column easily with Toad by going through add column wizard or Alter table wizard. Let's say if you have to add lots of columns to a table, I would rather write a simple sql code than to add columns through wizard. Here is the simple sql you can write for the same

Alter table_name add 
(column_a   datatype,
column_b   datatype,
column_c   datatype,
column_d   datatype,
....
)


You can add as many columns as you want in just one shot. Is' nt that useful??
                                    

No comments:

Post a Comment