INTEGER

The column type for whole numbers, used in this course for keys, quantities and money stored in cents.

In more detail

Integers are exact: adding and multiplying them never introduces rounding errors, which is why prices are stored as a whole number of cents. In SQLite, a column declared INTEGER PRIMARY KEY becomes the row's built-in identifier and is assigned automatically when you insert a row without one.

Example

price_cents INTEGER NOT NULL CHECK (price_cents > 0)

Related terms

Taught in

References