467,134 Members | 923 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,134 developers. It's quick & easy.

Sql Server Alter statement

100+
Hi all,

If I want to add more than one table to an existing table. What is the syntax. Can any one please help me finding this....

For One table:
--------------------
alter table tbl_Name
add column col_name varchar(200);

More than One?.

Thanks & Regards
Bharath Reddy VasiReddy
Oct 13 '08 #1
  • viewed: 1571
Share:
1 Reply
100+
hi all here i got a nice article on alter statements:

To add multiple columns to an existing table, the ALTER TABLE syntax is:

ALTER TABLE table_name
ADD ( column_1 column-definition,
column_2 column-definition,
...
column_n column_definition );

For example:

ALTER TABLE supplier
ADD ( supplier_name varchar2(50),
city varchar2(45) );

This will add two columns (supplier_name and city) to the supplier table.

For More infromation Please visit this page:
http://www.techonthenet.com/sql/tables/alter_table.php

Enjoy Coding........


Bharath Reddy VasiReddy
Oct 13 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by mikew@hyperreal.org | last post: by
7 posts views Thread by Serge Rielau | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.