Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

COUNT(*) function

877644Jul 25 2011 — edited Jul 29 2011
When i give
SELECT
COUNT(Salary)
FROM Employees;
--It counts number of fields in Salary column and returns value ignoring NULL fields.

But when we give COUNT(*), COUNT function is going to count which column..???
Likewise, when i give COUNT(constant), what is it doing ??????
And it is said that COUNT(constant) takes less time than COUNT(*) even though they return same output, Why is it so ????????
Can Anyone tell me what is internally happening during execution of this function.??
This post has been answered by Hemant K Chitale on Jul 29 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 26 2011
Added on Jul 25 2011
25 comments
4,568 views