You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the following script get a violation error:
create table t2(i integer primary key);
commit;
insert into t2(i) values(1);
insert into t2(i) values(2);
commit;
update t2 set i=i+1;
commit;
The text was updated successfully, but these errors were encountered:
While I agree this violates the SQL specification and thus may be considered being a bug, in fact this is a design pitfall. In Firebird, constraints are checked per row (not per statement as you expected). There's a workaround though: UPDATE T2 SET I = I+1 ORDER BY I DESC.
Submitted by: hardnut (hardnut)
the following script get a violation error:
create table t2(i integer primary key);
commit;
insert into t2(i) values(1);
insert into t2(i) values(2);
commit;
update t2 set i=i+1;
commit;
The text was updated successfully, but these errors were encountered: