Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: create sequence problem !! pls help
pke wrote:
> is it possible to do this?
>
> create sequence Test
> start by x
> increment by 1
> cache 1000;
No.
>
> 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;
No.
> so x has the highest value of the ID, I want the sequence to start from
> this value!
> Or is there an other solution ... ??
What are you trying to do? The above is Bad Design (tm) irrespective of the database technology you are using.
-- BillyReceived on Mon Dec 30 2002 - 03:16:01 CST
![]() |
![]() |