Thursday, 21 May 2015

Sql temp table with except

Sql temp table with except

Create table #TableName (Column1 datatype1, Column2 datatype2)

insert into #TableName 
Select Column1, Column2 from Table1
Except
Select Column1, Column2 from Table2

Select * from  #TableName
Drop table #TableName

No comments:

Post a Comment