Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Total rows in table

Re: Total rows in table

From: Fred Petillot <fpetillo_at_fr.oracle.com>
Date: Mon, 03 Jan 2000 14:55:35 -0100
Message-ID: <3870C677.A386A259@fr.oracle.com>


Kathinka Diehl wrote:

> Thomas Kyte <tkyte_at_us.oracle.com> schrieb:
> >
> > counting the rows with count() is the way to get the row count if you
> really
> > really need it.
>
> How about "select max(rownum) from TABLE"?

SQL> select max( rownum ) from emp;

MAX(ROWNUM)


     229376

Execution Plan


   0 SELECT STATEMENT Optimizer=CHOOSE    1 0 SORT (AGGREGATE)

   2    1     COUNT
   3    2       TABLE ACCESS (FULL) OF 'EMP'


Cheers,

    Fred

>
>
> Regards
> Kathinka

--

+-------------------------------------+----------------------------+
| Fred Petillot                       |     fpetillo_at_fr.oracle.com |
| Oracle France - Support Technique   |            +33 1 4762 8201 |
| 65, rue des Trois Fontanot          |            +33 6 8089 5135 |
| 92732 Nanterre Cedex                |                            |
+-------------------------------------+----------------------------+



Received on Mon Jan 03 2000 - 09:55:35 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US