Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> User Sequence Numbers
Hi,
let's create the following table:
create table foo (k number(5)); -- dont add primary key on k --
insert into foo values (1); insert into foo values (2); insert into foo values (3);
Is it possible, with the following statement, to create unique numbers ? Even with multiple sessions ?
select k from foo where k in (select max(k) from foo) for update of k;
k++;
insert into foo values (new_k);
commit;
... is there another solution ?
cu,
hal
Received on Fri Jan 31 2003 - 03:31:16 CST
![]() |
![]() |