Skip to content

Add parentheses in expressions containing more than one identifier or literal

Tako Lee edited this page Feb 21, 2014 · 2 revisions

Always use parentheses in expressions containing more than one identifier or literal. This clarifies code for inexperienced developers who are not familiar with operator precedence.

Original SQL:

IF nSSN < 2.5 THEN
   <statements>
END IF;

Formatted SQL:

IF (nSSN < 2.5) THEN
    <statements>
END IF;

Links:

http://www.dba-oracle.com/t_plsql_code_alignment_standards.htm

Clone this wiki locally