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)
 truncate column

Author  Topic 

u2p_inst
Yak Posting Veteran

78 Posts

Posted - 2004-03-28 : 22:32:45
Dear all,

is possible to truncate a field(autonumber) but no for the other fields, because i need only reset the column autonumber or any idea to reset autonumber column without delete the other column ??

thx

oh

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2004-03-28 : 22:53:27
I'm not sure if this is what you want or not.

If you have an identity field (autonumber), you can delete the column. To change what the identity column will be on the next insert, you can use the command

DBCC CHECKIDENT('table_name',RESEED,1).

1 would be the number you want to reset it to. If you type in 1, the next number to be inserted will be 2.


MeanOldDBA
derrickleggett@hotmail.com

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

- Advertisement -