Relative Content

Tag Archive for sqlerror-handling

Insert into table variable possible with error

if object_id(‘tempdb.dbo.#table_temp1’) is not null drop table #table_temp1 if object_id(‘tempdb.dbo.#table_temp2’) is not null drop table #table_temp2 if exists (select 1 from sys.tables where name = ‘table_real1’) drop table table_real1 if exists (select 1 from sys.tables where name = ‘table_real2’) drop table table_real2 declare @table_var1 table (id int identity(1,1), col1 varchar(10)) declare @table_var2 table (id int […]