I have a lot of independence queries. And I want to execute all of them in single script. Queries looks like below:
ALTER TABLE Table1
ALTER TABLE Table2
ADD CONSTRAINT Foo PRIMARY KEY ([ID])
ALTER TABLE Table3
ADD [Field1] nvarchar(50)
Look at second query. If we already have a primary key with name 'Foo' it throw error, and 3th query don't execute.
I want if one or more queries have problem they don't halt process and let remaining queries execute.
Thank you for help.
Computer Enterprise Masoud Keshavarz
I don't care about hell.
If I go there I've played enough Diablo to know how to fight my way out.