The catalog commands enable you to retrieve information such as the list of tables stored in a data source’s catalog, the list of column names in specified tables and the indexes associated with a table.
Using the catalog commands, you can:
- Get a list of columns and associated privileges for the specified table (ODBC_SQLColumnPrivileges)
- Obtain a list of column names in specified tables (ODBC_SQLColumns)
- Retrieve a list of foreign keys in the specified table or a list of foreign keys in other tables that refer to the primary key in the specified table (ODBC_SQLForeignKeys)
- Find out the information about data types supported by the data source (ODBC_SQLGetTypeInfo)
- Retrieve the column names that make up the primary key for a table (ODBC_SQLPrimaryKeys)
- Get the list of input and output parameters, as well as the columns that make up the result set for the specified procedures (ODBC_SQLProcedureColumns)
- Obtain the list of procedure names stored in a specific data source (ODBC_SQLProcedures)
- Find out information about columns within a specified table. Either the optimal set of columns that uniquely identifies a row in the table or the columns that are automatically updated when any value in the row is updated by a transaction. (ODBC_SQLSpecialColumns)
- Get a list of statistics about a single table and the indexes associated with the table (ODBC_SQLStatistics)
- Obtain a list of tables and the privileges associated with each table (ODBC_SQLTablePrivileges)
- Return a list of table, catalog, or schema names, and table types, stored in a specific data source (ODBC_SQLTables)