SQLite Forum

unique column constraint vs unique index
Login
Of course it can.  I assume that you mean the so-called upsert clause of an insert which specifies `INSERT ... ON CONFLICT (column-list) DO ...` as its syntax.

It makes absolutely no difference the fashion you use to define that column-list is unique, merely that it is.

This is specifically documented in the 5th paragraph of section 2 of <https://sqlite.org/lang_upsert.html> which states:

 > The special UPSERT processing happens only for uniqueness constraint on the table that is receiving the INSERT. A "uniqueness constraint" is an explicit UNIQUE or PRIMARY KEY constraint within the CREATE TABLE statement, or a unique index. UPSERT does not intervene for failed NOT NULL or foreign key constraints or for constraints that are implemented using triggers.