25 lines
645 B
Plaintext
25 lines
645 B
Plaintext
== Why is this an issue?
|
|
|
|
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
|
|
|
|
[source,text]
|
|
----
|
|
SELECT *
|
|
FROM PARTS, PRODUCTS
|
|
WHERE PARTS.PROD = PRODUCTS.PROD
|
|
----
|
|
|
|
|
|
=== Compliant solution
|
|
|
|
[source,text]
|
|
----
|
|
SELECT *
|
|
FROM PARTS
|
|
INNER JOIN PRODUCTS ON PARTS.PROD = PRODUCTS.PROD
|
|
----
|
|
|