-
AND、OR演算子は、それよりも、SQL言語の優先順位を存在する場合AND OR
condition1 OR condition2 AND condition3 等价于 condition1 OR (condition2 AND condition3)
SELECT * FROM EMR_YZB WHERE ( EMR_YZB.ZYH = 1131279) AND (EMR_YZB.YZQX = 0 and 0<3 and nvl(rjbrpb,0) <>1 Or 0 = 0 or EMR_YZB.YZQX = 2 and rjbrpb =1 ) 等价于 SELECT * FROM EMR_YZB WHERE ( EMR_YZB.ZYH = 1131279) AND ((EMR_YZB.YZQX = 0 and 0<3 and nvl(rjbrpb,0) <>1) Or (0 = 0 )or (EMR_YZB.YZQX = 2 and rjbrpb =1) )
SQL、AND、ORの優先順位
おすすめ
転載: blog.csdn.net/forchoosen/article/details/104369245
おすすめ
ランキング