CONDITION SQL SERVER NETEZZA
Exists Select * from Tab1 A Select * from Tab A
Where Exists (Select 1 Left Outer Join Tab B
From Tab2 B On A.col1 = B.col1
Where A.col1 = B.col1) Where B.col1 is not null
Not Exists Select * from Tab1 A Select * from Tab A
Where Not Exists (Select 1 Left Outer Join Tab B
From Tab2 B On A.col1 = B.col1
Where A.col1 = B.col1) Where B.col1 is null
IN Select * from Tab1 A Select * from Tab A
Where IN (Select 1 Left Outer Join Tab B
From Tab2 B On A.col1 = B.col1
Where A.col1 = B.col1) Where b.col1 is not null
Not IN Select * from Tab1 A Select * from Tab A
Where Not IN (Select 1 Left Outer Join Tab B
From Tab2 B On A.col1 = B.col1
Where A.col1 = B.col1) Where b.col1 is null
Delete Delete from Tab1 A Create Table Tmp_Tab1
where A.col1 is null as Select * from Tab1
where A.col1 is not null
Drop Table Tab1
Alter Table Tmp_Tab1 Rename to Tab1
Truncate Truncate table Tab1 Create Table Tmp_Tab1
as Select * From Tab1
where 1=2
Drop Table Tab1
Alter Table Tmp_Tab1 Rename to Tab1
Update Update Table Tab1 Create Table Tmp_Tab1
Set Col1 = 10 as Select 10 as Col1,
where Col1 is Null Col2,
-----
Coln
from Tab1
where Col1 is Null
Create Table Tmp_Tab2
as select * from Tab1 A
Left Outer Join Tmp_Tab1 B
On A.Col1 = B.Col1
where B.Col1 is null
Insert into Tmp_Tab1
select * from Tmp_Tab2
Drop table Tab1
Drop table Tmp_Tab2
Alter Table Tmp_Tab1 Rename to Tab1