Sub query with not equal
table_1
col1
SV0362
RU0177CSPG
NO0124CSPG
VN3582
AT9923CSPG
BZ0324
PE0309
AS4293EXPT
ML0331OMKT
table 2
colA
OO56128665
OO56128665
OO56128665
OO56128665
US0170
US0170
US0170
US0170
US0170
US0170
US0170
US0170
US0170
US0170
OO56128665
OO56128665
I want to compare col1 of table1 with colA of table 2 and return the values which are not qual
something like this
select * from table1 where col1 <> (select colA from table_2 a,table1 b where b.col1=a.colA)
but this would give single row returns more than one subquery
Best Answer
I assume you want rows from table 1 that does not exist in table_2 and vice versa: