您的位置首页生活百科

not exists应该怎么用?

not exists应该怎么用?

的有关信息介绍如下:

not exists应该怎么用?

select * from product where not exists (select productCode from somain where status != '已了结')

not exists :当 (select productCode from somain where status != '已了结') 查询不出任何结果的时候前面的select 语句才能继续执行查询

not in :查询出不存在在 (select productCode from somain where status != '已了结') 的资料

select * from product a where not exists (select productCode from somain where status != '已了结' and a.productCode=productCode)

这要看你表的具体结构跟数量

要看你表的具体结构跟数量