A SQLite UNIQUE constraint requires that the values inserted in the columns of a table be unique, it does not allow the insertion of duplicate values. Columns must be defined when creating the table with the uniqueness constraint. If the table contains only one column identified with a uniqueness constraint, then the values in that…(Continue Reading)
Category: SQLite
Learn SQLite Tutorial
SQLite CHECK constraint
An SQLite CHECK constraint can be assigned to a column definition or created as a table constraint. An SQLite CHECK constraint enforces table integrity by limiting the values of a column. When a new row is inserted into the table or an existing row is updated, the expression associated with each CHECK constraint is evaluated…(Continue Reading)
SQLite NOT NULL constraint
An SQLite NOT NULL constraint is assigned to a column definition. It is used most often when defining a column when creating a table in the database. NOT NULL is not a constraint at the table level but at the column level. Syntax Here is the syntax of SQLite NOT NULL constraint: CREATE TABLE table_name(…(Continue Reading)
SQLite FOREIGN KEY
A SQLite FOREIGN KEY is a constraint used to link two tables. A foreign key is a primary key from another table. A foreign key uses to enforce the relationships between two or more tables in SQLite database. In the SQLite database, foreign key constraints are disabled by default, so foreign key constraints must be…(Continue Reading)
SQLite PRIMARY KEY
SQLite PRIMARY KEY constraint represents a column or a combination of several columns that through their values uniquely identify each row in the table. An SQLite table can contain only one PRIMARY KEY constraint. As in SQL, a primary key can be defined in SQLite in two ways: Syntax Here is the syntax of SQLite…(Continue Reading)
SQLite AUTOINCREMENT
In this article we will show how SQLite AUTOINCREMENT is defined and what it is used for. The keyword SQLite AUTOINCREMENT is used when creating a table in the database, it is assigned to a column to automatically increase the respective column with integer values. SQLite AUTOINCREMENT is used most often when the column is…(Continue Reading)