Thursday, August 27, 2009

SSMS - INSERT script

SSMS allows you to quickly generate table scripts, such as INSERT, SELECT, and UPDATE, which can save lots of time when writing T-SQL.

However, I noticed that if you have an IDENTITY column the INSERT script will leave that out.

Granted, most of the time you won't be inserting a value into that column, and in fact you need SET IDENTITY_INSERT MyTable ON if you do wish to insert into that column. But I would prefer to see that column in the script, so I can remove it myself according to my needs.

No comments: