So "null" in sqlite is not a fixed value. If there's a constraint that involves a column that is null, it will always be considered unique.
Is it possible to take null into account too? My table looks like this:
CREATE TABLE test(
parent INTEGER
name TEXT
UNIQUE(name, parent)
....
and I want
UNIQUE(name, parent)
UNIQUE(name) if parent is null
Aucun commentaire:
Enregistrer un commentaire