SQL/MX 3.2.1 Reference Manual (H06.26+, J06.15+)
SQL/MX Statements
HP NonStop SQL/MX Release 3.2.1 Reference Manual—691117-005
2-394
Considerations for UPDATE
+>;
K1 K2 V3
---- ---- ------------------------------------------------------
0001 AAAA DCBA
0001 BBBB DCBA
--- 2 row(s) selected.
>>
NonStop SQL/MX updates both rows.
Primary key restrictions
UPDATES of primary key columns have the following restrictions:
•
Cursor updates on primary key columns are not supported, SQL error 4118 is
returned.
•
Embedded UPDATES on primary key columns are not supported, SQL error 4198
is returned.
•
SET ON ROLLBACK is not supported when:
•
A primary key column is updated, SQL error 4199 is returned. The following
example returns SQL error 4199:
>>create table t063t1 (a int not null, b int not null, c
>>int not null, primary key(a));
--- SQL operation complete.
>>insert into t063t1 values (1,1,1), (2,2,2), (3,3,3),
>>(4,4,4), (5,5,5);
--- 5 row(s) inserted.
>>update t063t1 set a = a+1 SET ON ROLLBACK c = 5;
*** ERROR[4199] The SET ON ROLLBACK clause cannot be
specified when clustering key columns are specified in the
SET clause of an UPDATE statement.
*** ERROR[8822] The statement was not prepared.
•
There is a primary key in the set-roll-clause, SQL error 4177 is
returned. The following example returns SQL error 4177:
>>update t063t1 set a = a+1 SET ON ROLLBACK a = 5;
*** ERROR[4177] Update of Index Key column A is not permitted on
rollback.
*** ERROR[8822] The statement was not prepared.
•
If a BEFORE trigger is defined on the primary key(s), SQL error 4033 is returned.










