Drag the edges to resize the window.

Query Results

Run a query to see results.

Database Schema

Schema undefined.
Code Editor
Set Operations


INTERSECT is used to combine two SELECT statements, but returns rows only from the first SELECT statement that are identical to a row in the second SELECT statement. This means that it returns only common rows returned by the two SELECT statements.

SELECT column_name(s) FROM table1 INTERSECT SELECT column_name(s) FROM table2;

For instance, we might want to know what brands in our newly acquired store are also in our legacy store. We can do so using the following query:

SELECT brand FROM new_products INTERSECT SELECT brand FROM legacy_products;
Report a Bug
If you see a bug or any other issue with this page, please report it here.