Hexret

Web Security · Business Logic

Unique constraint

A database rule that rejects duplicate non-null values for a column or specified column combination. UNIQUE (account_id, key) can protect a per-account business key even when two requests race. Application code must handle the resulting insert conflict.

Where you practice it

Related terms