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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple Column Drop

Status
Not open for further replies.

BDRichardson

Programmer
Jul 23, 2003
46
0
0
GB
Hi,

Would anyone kindly clarify for me whether it is fact possible or not to drop multiple columns from a SQL Server 2000 table? If, so how?

The SQL Server 2000 Online book implies that its possible by the [,...n] syntax after ALTER TABLE table DROP COLUMN column
 
Yes it is:
Code:
Create table #test (Fld1 Int, Fld2 Int, Fld3 Int)
SELECT * from #test
ALTER TABLE #Test DROP COLUMN Fld2, Fld3
SELECT * from #test
DROP TABLE #test

Borislav Borissov
VFP9 SP1, SQL Server 2000/2005.
 
Doh! ... I must be going mad! [ponder]

Thanks for setting me straight!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top