Stuff
public text v1 · immutable declare @x int; declare @y int; declare @dif bit;
select @x = count(col1) from table1 where col1 not in (select col1 from table2)
select @y = count(col1) from table2 where col1 not in (select col1 from table1)
if (@x>0) or (@y>0) @dif=1 else @dif=0;