DF086: Redundant parentheses are used.
Last modified: September 6, 2024
The topic describes the DF086 T-SQL code analysis rule.
Category
STYLE
Message
Redundant parentheses are used.
Description
To avoid potential confusion, it is recommended to remove parentheses that are not used to specify the desired order of operations.
Additional information
Using redundant parentheses in SQL code can make the code harder to understand for other developers and may lead to confusion or errors when maintaining or debugging the code in the future.
Noncompliant code example
SELECT
*
FROM dbo.DemoTable
WHERE (id = 2);
Compliant solution
SELECT
*
FROM dbo.DemoTable
WHERE id = 2;
Was this page helpful?