Muokkaa

Jaa


_Columns Table

The _Columns table is a read-only system table that contains the column catalog. It lists the columns for all the tables. 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 N

 

Columns

Table

The name of the table that contains the column.

Number

The order of the column within the table.

Name

The name of the column.

Remarks

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 property.

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.