declare @a table ( col char(1) )declare @b table ( col char(1) )insert @aselect 'a' union allselect 'b' union allselect 'c' union allselect 'd'insert @bselect 'a' union allselect 'a' union allselect 'b' union allselect 'b' union allselect 'b' union allselect 'c' select * from @a a inner join @b b on a.col = b.colselect * from @a a where exists( select * from @b b where a.col = b.col )
We walk in the dark places no others will enterWe stand on the bridge and no one may pass