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.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 ALTER TABLE

Author  Topic 

ashy_16in
Starting Member

16 Posts

Posted - 2004-07-16 : 17:16:40
While using ALTER TABLE command in SQL to add a new column, it always creates the column at the end of the table schema. Is it possible to specify the exact position of the new column within the table schema without using Enterprise Manager ?. I am having some issues using Enterprise Manager since it copies all the records to a temp table first and this process takes a long time.

rockmoose
SQL Natt Alfen

3279 Posts

Posted - 2004-07-16 : 18:12:19
The bad news...
No, the only way is to create a new table and copy the data from the original table into the new table with the altered structure.

The good news...
The ordering of the columns does not really matter, except for esthetic reasons.

/rockmoose
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2004-07-17 : 04:03:25
Copy of http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=37586
Go to Top of Page

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2004-07-17 : 09:35:23
Ashy....Please don't double, triple, quadruple bypass post like this. It's extremely annoying.

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page
   

- Advertisement -