Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How can I temporarily Lock a table?
In article <7h16t6$le1$1_at_news8.svr.pol.co.uk>,
"Neil Robinson" <vtr_at_firestorm996.freeserve.co.uk> writes:
> I am running an Access 97 front-end over Oracle 7.3 on Unix. Our Order
> Numbers are stored in a single-record table, which is incremented each time
> an order number is allocated. This is fine, but because of the code
> involved in incrementing the OrderNo I have a situation where the following
> scenario occurs....
You could use a sequence for this purpose, like this:
SQL> create sequence ordernum;
Sequence created.
SQL> select ordernum.nextval from dual;
NEXTVAL
1
SQL> select ordernum.nextval from dual;
NEXTVAL
2
Sequences can be given many parameters, like minimum values. You should read a book (or the documentation at technet.oracle.com) to learn all about them.
Remco
--
rd1936: 6:10pm up 6:11, 6 users, load average: 2.39, 2.30, 2.25
Received on Thu May 13 1999 - 13:41:55 CDT