Open iafisher opened 2 years ago
Example would be:
CREATE TABLE people( first_name TEXT, last_name TEXT, UNIQUE (first_name, last_name) );
This enforces that no rows may have both the same first_name and the same last_name.
first_name
last_name
UNIQUE constraint can also take a conflict clause, like UNIQUE (first_name, last_name) ON CONFLICT ROLLBACK.
UNIQUE
UNIQUE (first_name, last_name) ON CONFLICT ROLLBACK
Full documentation: https://sqlite.org/lang_createtable.html
i've implemented this now at my fork, basically the same as the primary key table constraint
Cool, if you have a PR I'd be happy to review it.
Example would be:
This enforces that no rows may have both the same
first_name
and the samelast_name
.UNIQUE
constraint can also take a conflict clause, likeUNIQUE (first_name, last_name) ON CONFLICT ROLLBACK
.Full documentation: https://sqlite.org/lang_createtable.html