-2

Unfortunately I get an error when I wanted to put the values ​​for my attributes. I don't know exactly what the problem is. For Info : I have previously created 8 tables successfully and i use SQLite Online.Here is the picture

I hope that someone can solve my problem.

1 Answers1

1

If a table has a UNIQUE constraint, it means the value of a column (or set of columns) must be unique, i.e. cannot be repeated for different rows in the table.

You're trying to insert a new record that breaks that constraint, i.e. the new row contains values in the constraint columns that already exist in the table with the same combination of values.

For example:

CREATE TABLE t1 (id INT, firstname, surname TEXT, UNIQUE (id, surname));
INSERT INTO t1 VALUES (1, 'John', 'Doe');
INSERT INTO t1 VALUES (1, 'Bob', 'Doe'); -- UNIQUE constraint failed: t1.id, t1.surname
choroba
  • 231,213
  • 25
  • 204
  • 289