[This is preliminary documentation and subject to change.]
The _Columns table is a read-only system table that contains the column catalog. All the columns for all tables are listed. You can query this table to find out if a given column exists.
The _Columns table has the following columns.
Column | Type | Key | Nullable |
---|---|---|---|
Table | Text | Y | N |
Number | Integer | Y | N |
Name | Text | N |
Because the _Columns table is a system table that cannot be modified through SQL queries, you cannot obtain the primary keys with the MsiDatabaseGetPrimaryKeys function or the PrimaryKeys method.
Only persistent columns are stored in the _Columns table. To determine if a temporary column exists one would need to create a view using a SELECT * statement against the table, then loop through all fields in a record returned by the MsiViewGetColumnInfo function with the MSICOLINFO_NAMES option.