【SQL Server】Count(*) vs Count(1) 区别

http://msdn.microsoft.com/en-us/library/ms175997.aspx

"1" is a non-null expression: so it's the same as COUNT(*). The optimiser recognises it for what is is: trivial.

The same as EXISTS (SELECT * ... or EXISTS (SELECT 1 ...

posted on 2013-06-29 17:12  海飞丝  阅读(300)  评论(0编辑  收藏  举报