Database Administration (MOSC)

MOSC Banner

Doesn't work default on table column with sequence in Oracle Database 19c Enterprise Edition

edited Mar 30, 2020 4:43AM in Database Administration (MOSC) 7 commentsAnswered ✓

Hello!

After upgrade to 19c I've got a problem with default sequence value. It doesn't work when I used insert into table with several defined columns using select.

I've found some conditions to reproducing the problem:

1. Table column should be created with default on null sequence.nextval

2. The column shouldn't be specified in table column list in the insert section

3. Select clause should contain variable in the result section

4. Select should include order by clause

For example. Let's create sequence and two tables

CREATE SEQUENCE XXTEST_SEQ_S  minvalue 1  maxvalue 9999999999999  start with 1  increment by 1  nocache;

CREATE TABLE XXTEST_TAB(  id_column NUMBER DEFAULT ON NULL XXTEST_SEQ_S.NEXTVAL ,column1 NUMBER  ,column2 NUMBER);
Tagged:

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