5

I would like to generate a data only insert script within SSMS 2012 which contain the if not exists statements to make the scripts idempotent.

Right clicking the database I wish to generate the script for and selecting Tasks -> Generate Scripts the advanced scripting options within this wizard have been set as follows:

Setup of advanced options

When this wizard generates the SQL there are no IF NOT EXISTS checks:

INSERT [dbo].[Table] ([Column1], [Column2]) VALUES (N'Data1', N'Data2')

Am I missing something in the scripting options or is this not possible?

ssilas777
  • 9,672
  • 4
  • 45
  • 68
Jpin
  • 1,527
  • 5
  • 18
  • 27

0 Answers0