How to insert identity column into the destination table.

Abhisek
Posted by Abhisek under Sql Server category on | Views : 3248
INDNTITY(data_type,[seed,increment]) AS column_name

This will insert an identity column into the destination table when used with SELECT INTO.
Example:-
SELECT IDENTITY(int,1,1) AS IDINTO NewTable FROM ExistingTable

Comments or Responses

Login to post response