【问题标题】:Where clause operator precedenceWhere 子句运算符优先级
【发布时间】:2020-09-03 08:59:30
【问题描述】:

谁能告诉我以下where clausule(使用括号)的优先级,Mariadb?由于多个and,我无法弄清楚

WHERE
    (
        A = 1
    )

OR 
    (
        B = 2
    )

AND 
    (
        C = 3
    )

AND 
    (
        D = 4
    )

提前致谢!

【问题讨论】:

    标签: sql mariadb where-clause operator-precedence


    【解决方案1】:

    ANDOR 之前。

    你得到的是WHERE A = 1 or (b = 2 and c = 3 and D = 4)

    这是你想要的吗?

    【讨论】:

      猜你喜欢
      • 2014-12-02
      • 1970-01-01
      • 2011-07-07
      • 2021-12-01
      • 2011-06-21
      • 2013-02-24
      • 2012-08-10
      相关资源
      最近更新 更多