SQLite PRAGMA

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:

cidnametypenotnulldflt_valuepkhidden
0idINTEGER0NULL10
1track_idINTEGER1NULL00
2quantityINTEGER1NULL00
3unit_priceREAL1NULL00
4totalREAL0NULL02

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 →