Skip to content

EXCEPT

SELECT column_name FROM table1
EXCEPT
SELECT column_name FROM table2;
| column_name |
|-------------|
| Value 1 |
| Value 3 |

The EXCEPT operator is used to return all the distinct rows from the first SELECT statement that are not returned by the second SELECT statement. In the given example, it is retrieving distinct rows from table1 that are not present in table2 based on the column_name specified.