In the Oracle SQL, why this code doesn’t compile? Oracle doesn’t support intersect? intersect only takes one column value?
assume two table have same column types.
Thanks
select B.name, B.id from tmp_B B where B.id in (select distinct id from tmp_A);
intersect
select distinct A.name, A.id from tmp_A A;
error message
Error report:
Unknown Command
There is a syntax error in your statement. You have an extra semicolon after the initial
SELECTand before theINTERSECT.should be a valid SQL statement assuming that
IDandNAMEhave the same data types in both tables.