PRAGMA table_xinfo
This pragma returns one row for each column in the named table, including generated columns and hidden columns.
PRAGMA schema.table_xinfo(table-name);
On the sample database
What PRAGMA table_xinfo(sales) returns on the sample database, in SQLite 3.54.1 as built for the browser by sql.js:
| cid | name | type | notnull | dflt_value | pk | hidden |
|---|---|---|---|---|---|---|
| 0 | id | INTEGER | 0 | NULL | 1 | 0 |
| 1 | track_id | INTEGER | 1 | NULL | 0 | 0 |
| 2 | quantity | INTEGER | 1 | NULL | 0 | 0 |
| 3 | unit_price | REAL | 1 | NULL | 0 | 0 |
| 4 | total | REAL | 0 | NULL | 0 | 2 |
What the SQLite documentation says
This pragma returns one row for each column in the named table, including generated columns and hidden columns. The output has the same columns as for PRAGMA table_info plus a column, "hidden", whose value signifies a normal column (0), a dynamic or stored generated column (2 or 3), or a hidden column in a virtual table (1). The rows for which this field is non-zero are those omitted for PRAGMA table_info.
From sqlite.org's pragma documentation for SQLite 3.54.1, in the public domain.
← table_list · temp_store →