Exception JOIN in SQL: How to Write Correctly – And Best Example

The purpose of JOINs is to get data from multiple tables. Exception JOIN is one kind of it. The best use of it is to get data that for not satisfied condition of JOINs. Bew SQL query describes on how to write Exception JOIN SQL query. Also, you can see the result out of it.

Best Example of SQL Exception Join Query

SELECT LastName, Area
FROM Employee
ON Employee.Dept = Department.Dept

Returns list of employees only if they do not have a valid department. Here it returns employee ‘Smith’ who does not have valid department.

EmployeeName                  Dept
--------------               ------
Smith                         Null

Related Posts

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.