DF114: The INNER/OUTER keywords for JOIN are not specified.
Last modified: September 6, 2024
The topic describes the DF114 T-SQL code analysis rule.
Category
STYLE
Message
The INNER/OUTER keywords for JOIN are not specified.
Description
To improve readability, it is recommended to explicitly specify the type of JOIN
Additional information
Explicitly specifying whether a JOIN is INNER or OUTER clarifies the relationship between the tables involved in the query and ensures that the query behaves as expected. Without this specification, it may be unclear whether the JOIN is intended to include all matching rows (INNER JOIN) or also include unmatched rows (OUTER JOIN), potentially leading to incorrect results or misunderstandings in the code.
Noncompliant code example
SELECT
*
FROM dbo.Customer c
JOIN dbo.Language l
ON c.LanguageId = l.LanguageId
Compliant solution
SELECT
*
FROM dbo.Customer c
INNER JOIN dbo.Language l
ON c.LanguageId = l.LanguageId
Was this page helpful?