Description
The following session illustrates the problem:
>>drop table if exists t1 cascade;
--- SQL operation complete.
>>
>>create table t1 (c1 int not null, c2 int, primary key (c1), unique (c2));
--- SQL operation complete.
>>insert into t1 values (1,1),(2,2),(3,3);
--- 3 row(s) inserted.
>>
>>merge into t1 on c2=1 when matched then delete;
*** ERROR[4002] Column "NEW@".C2 is not found. Table "NEW@" not exposed. Tables in scope: "OLD@". Default schema: TRAFODION.SEABASE.
*** ERROR[8822] The statement was not prepared.
>>
If the "unique" constraint is absent in the CREATE TABLE statement, the MERGE statement completes successfully.
Attachments
Issue Links
- links to