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

Home -> Community -> Usenet -> c.d.o.misc -> create sequence problem !! pls help

create sequence problem !! pls help

From: pke <pke_rsca_at_pandora.be>
Date: Sun, 29 Dec 2002 22:53:14 GMT
Message-ID: <u1LP9.78936$Ti2.11078@afrodite.telenet-ops.be>


is it possible to do this?

create sequence Test

    start by x
    increment by 1
    cache 1000;

where x is a variable which is determined in a PL/SQL procedure CREATE OR REPLACE PROCEDURE findID
( x OUT SMALLINT) AS
 v_max Test.ID%TYPE;
BEGIN

     SELECT max(id)      INTO v_max    FROM Test;
     x:=v_max;

END; BEGIN
    findID(:x);
END; so x has the highest value of the ID, I want the sequence to start from this value!
Or is there an other solution ... ??

Thx in advance Received on Sun Dec 29 2002 - 16:53:14 CST

Original text of this message

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