RE: Counting The records

RE: Counting The records

 

  

Or

select max(rownum) from tbl;

Seems to work.
Though I don't understand the avoidance of count(*)


-----Original Message-----
From: Cardus Ian
[mailto:oracledba-ezmlmshield-x42277273.[Email address protected]
Sent: Monday, July 18, 2005 4:28 AM
To: LazyDBA Discussion
Subject: RE: Counting The records

How about

SELECT SUM(1) FROM <table>;




-----Original Message-----
From: Krystian Zieja
[mailto:oracledba-ezmlmshield-x89522598.[Email address protected]
Sent: 18 July 2005 12:28
To: LazyDBA Discussion
Subject: Re: Counting The records


If you compute statistics on your table
you can use the following:

select owner,table_name,num_rows
from dba_tables
where owner = 'TableOwner' and table_name = 'TableName'

Best Regards
Krystian Zieja / mob
> Hi all
>
> How can i get the number of records in a table without using the COUNT

> function
>
> please gimme with a query
>
>
>
> Thanks
> C Chandra Guptan
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> Information transmitted by this EMAIL is proprietary to iGATE Group of

> Companies and is intended for use only by the individual or entity to
> whom it is addressed and may contain information that is privileged,
> confidential, or exempt from disclosure under applicable law. If you
> are not the intended recipient of this EMAIL immediately notify the
> sender at iGATE or [Email address protected] and delete this EMAIL
> including any attachments _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _ _ _ _ _ _ _ _ _ _
>
>
>
> --------
> website: http://www.LazyDBA.com
> Please don't reply to RTFM questions
> Oracle documentation is here: http://tahiti.oracle.com To unsubscribe:

> see http://www.lazydba.com/unsubscribe.html
> To subscribe: see http://www.lazydba.com By using this list you agree

> to these terms:http://www.lazydba.com/legal.html
>
>




--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com To unsubscribe:
see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com By using this list you agree
to these terms:http://www.lazydba.com/legal.html



************************************************************************
*****
This e-mail and its attachments are confidential and are intended for
the above named recipient only. If this has come to you in error, please
notify the sender immediately and delete this e-mail from your system.
You must take no action based on this, nor must you copy or disclose it
or any part of its contents to any person or organisation. Statements
and opinions contained in this email may not necessarily represent those
of Littlewoods Group Limited or its subsidiaries. Please note that
e-mail communications may be monitored. The Registered Office of
Littlewoods Group Limited and its subsidiaries is 100 Old Hall Street,
Liverpool, L70 1AB. Registered number of Littlewoods Group Limited is
5059352.
************************************************************************
*****




This message has been scanned for viruses by BlackSpider MailControl -
www.blackspider.com


--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html



--
This message has been scanned for viruses and dangerous content by
MailScanner, and is believed to be clean.

Douglas County, Oregon
www.co.douglas.or.us


Oracle LazyDBA home page