Rule Definition
ANSI syntax allow a clear separation between joins clause and the where clause restrictions. The ANSI notation makes the relations between the tables explicit, and saves you from coding equality tests for join conditions in the WHERE clause. Support for full outer joins also eliminates the need for complex workarounds to do those queries (With old syntax some construction can lead to an unexpected behavior). Moreover ANSI joins allows having optimization hints.
Remediation
Check the statement and if so, replace non ANSI-Standard joins with ANSI-Standard joins.
Violation Code Sample
SELECT first_name, department_name
FROM employees, departments
where(employees.manager_id = departments.manager_id
AND employees.department_id = departments.department_id);
Fixed Code Sample
The following example:
SELECT first_name, department_name
FROM employees, departments
where(employees.manager_id = departments.manager_id
AND employees.department_id = departments.department_id);
should be rewritten as:
SELECT first_name, department_name
FROM employees
JOIN departments
ON (employees.manager_id = departments.manager_id
AND employees.department_id = departments.department_id);
Related Technologies
Technical Criterion
Efficiency - SQL and Data Handling Performance
About CAST Appmarq
CAST Appmarq is by far the biggest repository of data about real IT systems. It's built on thousands of analyzed applications, made of 35 different technologies, by over 300 business organizations across major verticals. It provides IT Leaders with factual key analytics to let them know if their applications are on track.