Database Administration (MOSC)

MOSC Banner

Inserting into multiple columns using generated values and retaining same order

edited Jan 15, 2016 12:56AM in Database Administration (MOSC) 11 commentsAnswered

Does anybody have any idea how this table insert requirement can be achieved?

I have a table which is inserted into from multiple threads concurrently.

(SQL> insert into TABLE_TEST (seq_id, thread, create_date) values (my_seq.nextval, '$THREAD', current_timestamp); )

Two of its columns are generated values.

  1. column A - sequence.nextval
  2. column B - current_timestamp

I need to maintain the order of the table is the same, whether I order by Column A or column B. In other words column A and column B need to be in the same sequential order as each other.

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