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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2005-05-06 : 08:07:22
|
| Vilas writes "Hi All,I am working on SQL Server 2000.I want to add columns in the middle of the table. How can i add? Anyone has the answer? please reply ASAP.Thank-you & Regards,Vilas Relan" |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2005-05-06 : 08:09:09
|
| Create a new table with the columns you want in the positions you want.Copy the data from the old table to the new table.Drop the old table.Rename the new table to the old name.Sounds like a pain? It is, and completely unnecessary. Just use ALTER TABLE to add columns, and live with the fact that they get added to the end of the column list and the fact that it doesn't matter where columns are positioned. Books Online has more information under "ALTER TABLE". |
 |
|
|
|
|
|