Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
arkiboys
Master Smack Fu Yak Hacker
1433 Posts |
Posted - 2012-01-26 : 07:31:00
|
I would like to drop a field by indicating the index order and NOT the name of the field.How is this done please?something like: ?alter table tblMaindrop column(9)Thanks |
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
Posted - 2012-01-26 : 07:43:57
|
If you want to do that you'll need to query sys.columns for the name of the column with a column_id or 9, get the name into a variable and use dynamic SQL to run the ALTER.--Gail ShawSQL Server MVP |
 |
|
arkiboys
Master Smack Fu Yak Hacker
1433 Posts |
Posted - 2012-01-26 : 07:48:53
|
I see.Thanks |
 |
|
|
|
|