When two sets are given
s1 ={ a,b,c,d} s2={b,c,d,a}
(i.e)
TableA Item a b c d TableB Item b c d a
How to write Sql quer
Could do it with EXCEPT and a case
select case when count (1)=0 then 'Elements in TableA and TableB contains identical sets' else 'Nope' end from ( select item from s1 EXCEPT select item from s2 ) b