# TIL New SQL Operators - Except, UNION, Distinct

**Except Operator**

The `EXCEPT` operator returns distinct rows from the first (left) query that are not in the output of the second (right) query

**Eg: select \* from table1**

**except**

**select \* from table 2**

Returns all elements in table1 not present in table2

**UNION and Intersect Operator**

In case of two queries in two tables. The Union and Intersect operator does the union and intersection of two sets.

![](https://4253921594-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MhiOx8KkYnYxHHqfUbB%2Fuploads%2FwhFeY0Crl9gcjDC77cXk%2Fimage.png?alt=media\&token=d05bf056-2997-4c2b-98df-8fb6dc08fe2b)

**Distinct Operator**

In case of distinct operator, it returns all the unique values corresponding to a query value we want.

`SELECT DISTINCT(status) FROM employee;`
