SQLite - Unique Key (Indice)

Sqlite Banner

About

Relational Data Modeling - Unique (Constraint|Key) in SQlite

Example

  • B is Unique (and has no name)
CREATE TABLE t1(a, b UNIQUE);
CREATE TABLE t1(a, b);
CREATE UNIQUE INDEX t1b ON t1(b); 

Documentation / Reference





Discover More
Sqlite Banner
How to create or add a Primary Key to a Sqlite Table

This article shows you how to add, create or modify a SQL primary key constraint The following schemas are logically equivalent because the primary keys are implemented by creating a unique index...
Sqlite Banner
Sqlite - Sql Grammar

The whole SQL syntax documentation for SQLite can be found at lang and/or full sql This error may be caused...



Share this page:
Follow us:
Task Runner