Turning the AutoNumber property Off in SQL Server

I need to insert predefined autonumbers from another table into a new table. Is there a way to turn the AutoNumber property off in the new table, insert the records, then turn the property back on?
SpaceCoastLifeAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Jim HornConnect With a Mentor Microsoft SQL Server Developer, Architect, and AuthorCommented:
SET IDENTITY_INSERT OFF

-- Do your inserting into a tale with an identity column here

SET IDENTITY_INSERT ON

http://msdn.microsoft.com/en-us/library/aa259221(v=sql.80).aspx
0
 
SpaceCoastLifeAuthor Commented:
Thanks for the help
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.