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 |
|
Job
Yak Posting Veteran
69 Posts |
Posted - 2005-08-20 : 22:51:54
|
| I have an existing table w approx 6mm lines. I now need an Auto id field. Is there a way to do this?Cheers |
|
|
Job
Yak Posting Veteran
69 Posts |
Posted - 2005-08-21 : 00:03:06
|
| Ok,I used this and it seems to work...Alter Table Tbl_Txn_Line_CHSadd AutoNum Numeric(5,0) identity |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2005-08-21 : 02:16:16
|
| That will do the trick. You might have been better off using an INT datatypeThe NUMERIC will use 5 bytes, the INT only 4 and applications sometimes cough on NUMERIC data type (I've never understood why, but I've seen it all too often!)If you've got Entereprise Manager you can use the DESIGN tool (right click the table) to script your changes for youKristen |
 |
|
|
|
|
|