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!

differenct between count(0), count(1) and count(*)...???

544878Jun 19 2007 — edited Jun 30 2007
Hi,

Please clarify the difference b/w count(0), count(1) and count(*)...???.

SQL> set timing on
SQL> select count(0) from trade
2 /

COUNT(0)
----------
112158506

Elapsed: 00:00:03.08
SQL> ed
Wrote file afiedt.buf

1* select count(1) from trade
SQL> /

COUNT(1)
----------
112158506

Elapsed: 00:00:02.01
SQL> ed
Wrote file afiedt.buf

1* select count(*) from trade
SQL> /

COUNT(*)
----------
112158506

Elapsed: 00:00:02.03
SQL>

Is there any differences??

Thanks
SATHYA
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 28 2007
Added on Jun 19 2007
22 comments
33,585 views