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 -> Re: How can I temporarily Lock a table?

Re: How can I temporarily Lock a table?

From: Remco Blaakmeer <remco_at_rd1936.quicknet.nl>
Date: 13 May 1999 18:41:55 GMT
Message-ID: <7hf6dj$bam$1@rd1936.quicknet.nl>


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

Original text of this message

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