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 |
|
landau66
Yak Posting Veteran
61 Posts |
Posted - 2007-11-14 : 06:05:29
|
| Hi everyone!I just started with SQL and SQL Server 2005. I cantfind in my books how to add a column to an existing table. It should be a primary key, auto_increment column.Hope someone can help, many thanks in advanceGreetings from Vienna Austrialandau |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-11-14 : 06:29:22
|
In Books Online I found this syntaxALTER TABLE Table1ADD Col1 INT IDENTITY(1, 1) PRIMARY KEY NONCLUSTERED E 12°55'05.25"N 56°04'39.16" |
 |
|
|
sunsanvin
Master Smack Fu Yak Hacker
1274 Posts |
Posted - 2007-11-14 : 06:53:15
|
| if you want to add a new column as last column in the table, you have to use the query by peso.and if you want to add a column in the middle of a table, you have to go to the management studioVinodEven you learn 1%, Learn it with 100% confidence. |
 |
|
|
|
|
|