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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Counting number of rows, sequences

RE: Counting number of rows, sequences

From: Mark Leith <mark_at_cool-tools.co.uk>
Date: Wed, 18 Feb 2004 09:15:41 -0000
Message-ID: <000601c3f5ff$c7fbf630$04fea8c0@mark>


And what happens when any rows get deleted? ;)

-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Jan Pruner Sent: 17 February 2004 22:31
To: oracle-l_at_freelists.org
Subject: Re: Counting number of rows, sequences

Sorry to say it, but this is not a good idea. Sequence doesn't rollback in case the transaction is not commited. And CURRVAL is local to user session. "Note that before you use CURRVAL for a sequence in your session, you
must first initialize the sequence with NEXTVAL."

JP

Juan Cachito Reyes Pacheco wrote:

> The other choice if you have to frecuently do counts to that table is
> a sequence
>
> You create an addiatoinal field with a sequence
>
> CREATE SEQUENCE, etc.
>
> row sequence
>
> 1 1
> 2 2
> ....
> 1234 1234



Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.581 / Virus Database: 368 - Release Date: 09/02/2004
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.581 / Virus Database: 368 - Release Date: 09/02/2004
 

----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request_at_freelists.org
put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
Received on Wed Feb 18 2004 - 03:15:41 CST

Original text of this message

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