SQL Language (MOSC)

MOSC Banner

Parallel DML vs DML order

Hi all,

Lets say I have these SQL Satements:


ALTER SESSION ENABLE PARALEL DML;


-- Create a new column for the sequence number.

ALTER TABLE a ADD (seqno NUMBER(38) NULL);


 -- Everyone gets a unique sequence number!

CREATE SEQUENCE seq_counter START WITH 1;


 UPDATE a SET seqno = seq_counter.NEXTVAL;


 -- Save the sequence number to use next.

INSERTINTO mrn (id, last_no) VALUES ('a', seq_counter.NEXTVAL);

 DROP SEQUENCE seq_counter;


Assuming the UPDATE is executed in parallel for table a, is it possible that the INSERT in table mrn does not always have the higher sequence number? Is it something documented by Oracle?

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center