首页 > Linux操作系统 > Linux操作系统 > 理解exists count
两个查询出来的结果一样吗?理解exists的判断条件。
select 1
from dual d
where exists(
select 1
from dual d2
where d.DUMMY=d2.DUMMY
and 1=2
)
/
select 1
from dual d
where exists(
select count(*)
from dual d2
where d.DUMMY=d2.DUMMY
and 1=2
)
下边的查询结果一样吗? count是如何计数的。
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/25323853/viewspace-746845/ ,如需转载,请注明出处,否则将追究法律责任。