Home > Enterprise >  How can do subscription between two SELECT set?
How can do subscription between two SELECT set?

Time:12-11

SELECT field1
FROM tbl1
WHERE conditionsx

...?

SELECT field2
FROM tbl2
WHERE conditionsy

I Want return same below↓ What is superscription between two SELECT results.

enter image description here

CodePudding user response:

You can use the INTERSECT operator:

SELECT field1 FROM tbl1 WHERE conditionsx
INTERSECT
SELECT field2 FROM tbl2 WHERE conditionsy
  • Related