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)
 how to turn off identity using ALTER sql ?

Author  Topic 

matkwan
Starting Member

36 Posts

Posted - 2002-09-27 : 20:52:43
Hi, I have tried the following SQLs but didn't work.

ALTER TABLE tblUsers MODIFY userID int IDENTITY(0,1);

ALTER TABLE tblUsers ALTER COLUMN userID int IDENTITY(0,1);

Please help.
Thanks

shallu1_gupta
Constraint Violating Yak Guru

394 Posts

Posted - 2002-09-28 : 01:08:32
Hi,
u can use "set identity_insert <tablename> on|off"
to switch off or on the identity insert

Go to Top of Page

harshal_in
Aged Yak Warrior

633 Posts

Posted - 2002-09-28 : 03:01:39
try using

SET IDENTITY_INSERT [ database. [ owner. ] ] { table } { ON | OFF }

harsh.

Go to Top of Page
   

- Advertisement -