Im trying to alter my table "Materiel" for make a primary key.,but this instruction is not working.
ALTER TABLE "MATERIEL" ADD CONSTRAINT "MATERIEL_PK" PRIMARY KEY ("MATRICULE")
This is stack trace:
[00:22:39] Error while executing SQL query on database 'Data': near "CONSTRAINT": syntax error
That won't work as that syntax is not supported by SQLite3 (see https://sqlite.org/lang_altertable.html). To do this, you need to re-create the table to include the constraint.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With