INTEGER: An integer is a whole number without a decimal point.
REAL: A real number is a number with a decimal point.
TEXT: A text is a string of characters.
BLOB: A BLOB is a binary large object, which can store any type of data, including images, audio, and video.
In addition to these basic data types, SQLite also supports a number of other data types, such as:
DATETIME: A DATETIME is a date and time value.
TIME: A TIME is a time value.
DATE: A DATE is a date value.
NUMERIC: A NUMERIC is a number with a fixed precision.
CHAR: A CHAR is a fixed-length string.
VARCHAR: A VARCHAR is a variable-length string.
REALM: A REALM is a secure data type that can be used to store sensitive data.
The data type of a column is specified when the column is created. For example, the following statement creates a column called
id of type INTEGER:
Code snippet
CREATE TABLE employees (
id INTEGER PRIMARY KEY
);
Once a column has been created, its data type cannot be changed.
The data type of a column determines the range of values that can be stored in the column. For example, an INTEGER column can store any whole number, while a TEXT column can store any string of characters.
The data type of a column also affects the performance of queries that are performed on the column. For example, queries on INTEGER columns are typically faster than queries on TEXT columns.
When choosing a data type for a column, it is important to consider the range of values that will be stored in the column and the performance requirements of the queries that will be performed on the column.
Markdown for AI
A clean, structured version of this page for AI assistants and LLMs.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
SQLite supports the following data types:
In addition to these basic data types, SQLite also supports a number of other data types, such as:
The data type of a column is specified when the column is created. For example, the following statement creates a column called
idof type INTEGER:Code snippet
Once a column has been created, its data type cannot be changed.
The data type of a column determines the range of values that can be stored in the column. For example, an INTEGER column can store any whole number, while a TEXT column can store any string of characters.
The data type of a column also affects the performance of queries that are performed on the column. For example, queries on INTEGER columns are typically faster than queries on TEXT columns.
When choosing a data type for a column, it is important to consider the range of values that will be stored in the column and the performance requirements of the queries that will be performed on the column.