SQL Logic Operator Precedence: And and Or

后端 未结 4 664
深忆病人
深忆病人 2020-11-21 23:53

Are the two statements below equivalent?

SELECT [...]
FROM [...]
WHERE some_col in (1,2,3,4,5) AND some_other_expr

and

SELE         


        
4条回答
  •  花落未央
    2020-11-22 00:49

    1. Arithmetic operators
    2. Concatenation operator
    3. Comparison conditions
    4. IS [NOT] NULL, LIKE, [NOT] IN
    5. [NOT] BETWEEN
    6. Not equal to
    7. NOT logical condition
    8. AND logical condition
    9. OR logical condition

    You can use parentheses to override rules of precedence.

提交回复
热议问题