rspec/rules/S1741/rule.adoc

21 lines
589 B
Plaintext
Raw Normal View History

2021-01-27 13:42:22 +01:00
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.
2020-06-30 12:47:33 +02:00
== 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
----