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
CREATE TABLE FOO (
ID VARCHAR(20),
VAL VARCHAR(20)
);
CREATE UNIQUE INDEX I_FOO_UNQ ON FOO (ID, VAL);
I then insert a single record with no problem:
insert into foo values ('id1', 'bar');
I then insert a second record with a different VAL field (there is a space after "bar"):
insert into foo values ('id1', 'bar ');
This should be OK but I get this error (in IBExpert):
Invalid insert or update value(s): object columns are
constrained - no 2 table rows can have duplicate column values.
attempt to store duplicate value (visible to active transactions) in unique index "I_FOO_UNQ".
The text was updated successfully, but these errors were encountered:
Submitted by: Roddi Walker (roddi)
I have the following table:
CREATE TABLE FOO (
ID VARCHAR(20),
VAL VARCHAR(20)
);
CREATE UNIQUE INDEX I_FOO_UNQ ON FOO (ID, VAL);
I then insert a single record with no problem:
insert into foo values ('id1', 'bar');
I then insert a second record with a different VAL field (there is a space after "bar"):
insert into foo values ('id1', 'bar ');
This should be OK but I get this error (in IBExpert):
Invalid insert or update value(s): object columns are
constrained - no 2 table rows can have duplicate column values.
attempt to store duplicate value (visible to active transactions) in unique index "I_FOO_UNQ".
The text was updated successfully, but these errors were encountered: