Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Alter Column(s)?

Status
Not open for further replies.

paulosinuk

IS-IT--Management
Feb 8, 2001
105
AU
Hi

Can you use the alter column statement to alter more that one column at a time, I don't seem to be able to find the right syntax to do this?

Thanks

Paulos
 
Seperate each new column by a comma..

ALTER TABLE <TABLENAME>
ADD <columnname> <datatype>,
<columnname> <datatype>,
<columnname> <datatype>
 
OOPS!!! I read it as add columns instead of alter columns.
Just ignore the previous post.

-Manjari
 
So is there a syntax for being able to alter multiple columns in the same statement?
 
No, you have to use multiple ALTER TABLE statements.

Code:
ALTER TABLE t
ALTER COLUMN c1 ...

ALTER TABLE t
ALTER COLUMN c2 ...

--James
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top