Pros and Cons of the JOIN Clause


The two queries below are the same:

Pre-ANSI-92 SQL:
SELECT * FROM table_1, table_2
  WHERE table_1.column = table_2.column

ANSI-92 SQL:
SELECT * FROM table_1 JOIN table_2
  ON table_1.column = table_2.column

The main reason to use ANSI-92 syntax is because ANSI-89 does not have any OUTER JOIN (LEFT, RIGHT, FULL) support. The ANSI-92 syntax is recommended to be used:

Demonstration
Below is an SQL test area from W3Schools, which uses the well-known Northwind sample database. The tables here are for read only because of the problem of embedding the scripts. For a fully working example, check this by using Chrome.

SQL Statement:

Edit the SQL statement and click     to see the result, or  

Result:
The Database includes:
The Database includes:

TablenameRecord
Customers91
Categories8
Employees10
OrderDetails518
Orders196
Products77
Shippers3
Suppliers29




      “You know you’re working class when —    
      your TV is bigger than your bookcase.” —    
      — Rob Beckett