Since ANSI SQL-92, explicit joins using the JOIN
keyword have been possible, and are preferred. Therefore table joins should be done
with help of the one of the following clauses: JOIN
, INNER JOIN
, LEFT OUTER JOIN
, RIGHT OUTER
JOIN
, and FULL OUTER JOIN
. The old way to join tables is deprecated and should not be used anymore.
Noncompliant code example
SELECT *
FROM PARTS, PRODUCTS
WHERE PARTS.PROD = PRODUCTS.PROD
Compliant solution
SELECT *
FROM PARTS
INNER JOIN PRODUCTS ON PARTS.PROD = PRODUCTS.PROD