且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在WHERE子句中对布尔表达式进行分组

更新时间:2023-01-15 16:21:58

因为您需要将布尔表达式组合在一起,否则它将评估它们seperateley和返回任何匹配其中任何一行的行。


这是你的查询的样子:
Because you need to group your boolean expressions together, or else it will evaluate them seperateley and return any row that matches any of them.

This is how your query should look:
展开 | / span> Sele ct | Wrap | 行号


我编辑了帖子的标题以更好地描述它的内容。

请阅读发布指南发布前

主持人
I have edited the thread''s title to better describe it''s contents.
Please read the Posting Guidlines before posting

Moderator


请给我建议......


i将PartNumber和SupplierName作为我的主要 ..


[PHP]" select * from cbomnew PartNumber not in(从cbom_filtered中选择PartNumber)和( comCode ='''PCEC''或comCode =''LOX''或comCode ='''CCEC'')" [/ PHP]


我如何把它像


选择PartNumber和SupplierName不在(从cbom_filtered中选择PartNumber)?????


i想比较2个数据,这些数据是partnumber和suppliername ..我该怎么做...
Pls advice me...

i have PartNumber and SupplierName as my primary key..

[PHP]"select * from cbomnew where PartNumber not in (select PartNumber from cbom_filtered) and (comCode= ''PCEC''or comCode=''LOX''or comCode=''CCEC'' )"[/PHP]

how do i put like

select PartNumber and SupplierName not in( select PartNumber from cbom_filtered) ?????

i wan to compare 2 data which are partnumber and suppliername.. how do i do that...