Posted inSQL
EXCEPT Clause in SQL Server
The Except Operator returns any distinct values from the left query that are not also found on the right query.
The Except operator evaluates the output of two query expressions and returns the difference between the results. The result set contains all rows returned from the first query expression except those rows that are also returned from the second query expression.
Syntax:-
SELECT [TableName1].[ColumnName1]
FROM TableName1
EXCEPT
SELECT [TableName2].[ColumnName2]
FROM TableName2