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

Home -> Community -> Usenet -> comp.databases.theory -> Re: NextNumbers Tables

Re: NextNumbers Tables

From: Pablo Sanchez <pablo_at_dev.null>
Date: Wed, 12 Feb 2003 15:02:18 -0600
Message-ID: <Xns93208ECE962EApingottpingottbah@216.166.71.233>


Larry Coon <larry_at_assist.org> wrote in news:3E4A99BF.599C_at_assist.org:

> Pablo Sanchez wrote:
>

>> 2) Set a local variable within the UPDATE:
>> 
>>    UPDATE mytable
>>       set @my_next_val = next_val,
>>           next_val     = next_val + 1
>>       ...
>>    COMMIT;

>
> Hmm, is the order of evaluation guaranteed?

I believe with ASE you can coerce it to do the right thing by using the local variable on the RHS.

> What's to stop a particular implementation from doing the second one
> first?

It's definitely implementation dependent which means that the vendor needs to document. I equate it to how C is documented to evaluate and stop evaluation on false from left to right.

-- 
Pablo Sanchez, High-Performance Database Engineering
http://www.hpdbe.com
Received on Wed Feb 12 2003 - 15:02:18 CST

Original text of this message

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