Name
table_info — List column information for a table
Common Usage
PRAGMA [database
.]table_info(table_name
);
Description
The table_info
pragma is used to query information
about a specific table. The result set will contain one row for
each column in the table.
Column name | Column type | Meaning |
---|---|---|
cid
| Integer | Column index |
name
| Text | Column name |
type
| Text | Column type, as given |
notnull
| Integer | Has a NOT
NULL constraint |
dflt_value
| Text | DEFAULT
value |
pk
| Integer | Is part of the PRIMARY KEY |
The default value (dflt_value
) will be given as a text representation of
the literal value representation. For example, a default text
value includes the single quotes.
See Also
Get Using SQLite now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.