在SQL server中and和or的执行顺序是什么?select *from productswhere unitprice>16 and productid=16 or productname like 'T%'select *from productswhere unitprice>16 and productname like 'T%' or productid=16恳请专家说一下这两个语句执

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/11 04:36:46
在SQL server中and和or的执行顺序是什么?select *from productswhere unitprice>16 and productid=16 or productname like 'T%'select *from productswhere unitprice>16 and productname like 'T%' or productid=16恳请专家说一下这两个语句执

在SQL server中and和or的执行顺序是什么?select *from productswhere unitprice>16 and productid=16 or productname like 'T%'select *from productswhere unitprice>16 and productname like 'T%' or productid=16恳请专家说一下这两个语句执
在SQL server中and和or的执行顺序是什么?
select *
from products
where unitprice>16 and productid=16 or productname like 'T%'
select *
from products
where unitprice>16 and productname like 'T%' or productid=16
恳请专家说一下这两个语句执行过程有什么不一样?

在SQL server中and和or的执行顺序是什么?select *from productswhere unitprice>16 and productid=16 or productname like 'T%'select *from productswhere unitprice>16 and productname like 'T%' or productid=16恳请专家说一下这两个语句执
第一个查询单价大于16且产品编号是16的,或产品名称以T开头的产品.
第二个是查询单价大于16且产品名称以T开头 或者产品编号是16的.
and优先级高于or,一般这种表达式可以用()括起来,