Access metadata

Applications and users can access SQLite metadata through the driver in the following ways:

  • ODBC API functions: The driver supports standard ODBC functions that allow metadata retrieval through the API, without the need to write SQL queries. These functions include SQLColumns, SQLForeignKeys, SQLPrimaryKeys, SQLTables, and more.

    For a complete list of supported functions and detailed descriptions, see ODBC functions for metadata retrieval.

  • PRAGMA statements for metadata: SQLite metadata isn’t stored in any system tables that you can query directly with SQL. Instead, SQLite provides a set of special expressions, called PRAGMAs, which provide details about tables, columns, constraints, and relationships.

    For more information, see PRAGMA statements for metadata.