[dba-SQLServer]Turn Identity property of a column on/off in script

Susan Geller sgeller at cce.umn.edu
Wed Oct 29 09:46:14 CST 2003

I have a table that has a PK field whose identity property is "Yes".  I
need to do an insert into this table and for that I want the identity
property to be "No".  I want to change the identity property of my
column from "yes" to "no", then do the insert and then change it back to
"yes" again.  I want to script this but I can't figure out how to do
that. SQL Server 2000.

TIA.  -- Susan

Susan B. Geller
Office of Information Systems
College of Continuing Education
University of Minnesota
306 Wesbrook Hall
77 Pleasant Street SE
Minneapolis, MN 55455
Phone:  612-626-4785
Fax:  612-625-2568

More information about the dba-SQLServer mailing list