10. Understanding ODBC Connectivity : ODBC Programming : Metadata (Catalog) Queries
 
Share this page                  
Metadata (Catalog) Queries
Sometimes an ODBC application needs to know information about items in the database, such as tables, permissions, primary keys, and so on. The ODBC Driver supports all ODBC functions pertaining to this information. The following table summarizes the functions available:
Function
Description
SQLColumns
Column names in tables
SQLColumnPrivileges
Privileges of columns in tables
SQLForeignKeys
Foreign keys for a table
SQLPrimaryKeys
Column names of primary keys in a table
SQLTables
Table names in a database
SQLTablePrivileges
Privileges of tables in a database
SQLProcedures
Procedure names in a database
SQLProcedureColumns
Input and output names of a database procedure
SQLSpecialColumns
Columns that uniquely identify a row
SQLStatistics
Statistics and indexes associates with a table