An Easy way to add an Identity column to a table created by SELECT .. INTO is:
Assume the table is created using
SELECT NAME INTO NAMES2 FROM NAMES1
simply add this,
SELECT IDENTITY(INT, 1,1) AS [ID], NAME INTO NAMES2 FROM NAMES1
July 13, 2007 by Emad Gabriel
An Easy way to add an Identity column to a table created by SELECT .. INTO is:
Assume the table is created using
SELECT NAME INTO NAMES2 FROM NAMES1
simply add this,
SELECT IDENTITY(INT, 1,1) AS [ID], NAME INTO NAMES2 FROM NAMES1
Leave a Reply