Re: Sequences

From: (wrong string) ørn Aambø <kolbjorn.aambo_at_ub.uio.no>
Date: 1996/08/06
Message-ID: <kolbjorn.aambo-0608961551210001_at_ubmac86.uio.no>#1/1


In article <32040DCF.539D_at_well.com>, Michael Wilson <mkwilson_at_well.com> wrote:

> I have a couple of questions about sequences:
>
> 1. Just how lightweight are sequences? From what I've read, they seem to
> provide a unique # for any number of requestors, without all the muss
> and fuss of creating a counter in a row, and going through the overhead
> of locking, etc; to maintain it. Right?
>
> 2. How many sequences can I have? We have an application which
> potentially require thousands of individual sequences, but's it's
> unclear how much overhead each one takes. From my reading, it looks like
> sequences are stored in the data dictionary, but does each one consist
> merely of a row?
>
> Thanks in advance..

If I define the following in PL/SQL:

CREATE SEQUENCE sq START WITH 13 INCREMENT BY 1;

I want to do do the following in PL/SQL but are not able to:

CREATE OR REPLACE FUNCTION SA RETURN NUMBER IS    id NUMBER;
BEGIN
   RETURN sq.NEXTVAL;
END SA; What am I doing wrong? Received on Tue Aug 06 1996 - 00:00:00 CEST

Original text of this message