Skip to content

ROWNUM always returns 0 for updates with data change delta table. #3353

@htran1

Description

@htran1

This issue was observed with h2-2.0.206.

Set up table with some initial data.

drop table if exists table2;
Create table table2 (col1 bigint, col2 bigint);
insert into table2 values (1, 1);
insert into table2 values (2, 2);
insert into table2 values (3, 3);

Update without data change delta table produces the expected results.

update table2 set col2 =  rownum + 10;
select * from table2;
COL1  	COL2  
1	11
2	12
3	13

Notice that all the values of col2 are 10 above instead of 11, 12, 13 .

SELECT col1, col2 FROM FINAL TABLE 
    (UPDATE table2 SET col2 = rownum + 10);
COL1  	COL2  
1	10
2	10
3	10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions