当我在运行时
select code from account where exists (select account from store)
except
select code from account where code = any (select account from store)
它给我带来了两个结果,这意味着它们不相同。经过我的研究,我没有发现它们之间有任何区别。根据我的了解,“any”很少使用。是否有人可以帮助我解决这个问题?
当我在运行时
select code from account where exists (select account from store)
except
select code from account where code = any (select account from store)
它给我带来了两个结果,这意味着它们不相同。经过我的研究,我没有发现它们之间有任何区别。根据我的了解,“any”很少使用。是否有人可以帮助我解决这个问题?
select code from account where exists (select 1 from store where store.account = account.code)
这些应该是等价的。
= any
和in
是相同的,所以你从未看到过它。 - Martin Smith