select 0 from 的好处

select * from tab a where exists
(select 0 from tab b where a.id=b.id)
0在这里没有意义 这样写可以提高查询速度 因为不用在展现真实数据
select * from tab a where exists
(select * from tab b where a.id=b.id)
与上边效果一样 上边的效率更高

查询速度能提高多少,等测试了再给结果
posted @ 2007-02-10 00:42  jacktu  阅读(6718)  评论(0编辑  收藏  举报