Re: Diff Between Count( * ) and Count( 1 )

Re: Diff Between Count( * ) and Count( 1 )

 

  


This email is subject to Terms and Conditions as found in our Email Legal Notice which forms part of this email message in terms of section 11 of the Electronic Communications and Transaction Act 25 of 2002. Please click on http://www.mf.co.za/content/EMAIL_Legal_Notice.asp , or send a blank email to [Email address protected] By receiving, reading or acting upon this email you will automatically be bound by the terms of the Email Legal Notice.
Mutual & Federal Insurance Company Limited
Authorised Financial Services Provider

-----

There are no differences between the two, and Oracle will internally
convert the COUNT(1) into COUNT(*) before returning the results.

try the following
set autotrace on
select count(*) from yourtable;

and then

select count(1) from yourtable;

Regards;
Jyothish John


>>> "dgaikwad"
<oracledba-ezmlmshield-x38823388.[Email address protected] 29/06/2007
05:41 >>>

Hi DBA's

Can anyone tell me Which is to use COUNT(*) or COUNT(1) and Why?

What is exact Difference between them?



Thanks & Regards,
Dinesh G.


---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html




Oracle LazyDBA home page