---
title: Information schema
description: INFORMATION\_SCHEMA is a SQL-standard schema that exposes metadata about objects across all catalogs in the metastore, in Databricks SQL and Databricks Runtime.
canonical_url: https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-information-schema
---

# Information schema

**Applies to:** ![check marked yes](https://docs.databricks.com/aws/en/images/icons/check.png) Databricks SQL ![check marked yes](https://docs.databricks.com/aws/en/images/icons/check.png) Databricks Runtime 10.4 LTS and above ![check marked yes](https://docs.databricks.com/aws/en/images/icons/check.png) Unity Catalog only

In the `SYSTEM` catalog, the `INFORMATION_SCHEMA` is a SQL standard schema that provides metadata about objects across all catalogs in the metastore. It does not contain metadata about `hive_metastore` objects.

Separately, each catalog created in Unity Catalog also automatically includes an `information_schema` that describes metadata about objects in that catalog only.

Both types of information schemas automatically filter results to include only the objects you have Unity Catalog privileges to access. This behavior differs from other Databricks system tables. See [How information schema system tables handle permissions](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-information-schema.md#permissions).

The purpose of the information schema is to provide a SQL-based, privilege-aware, and self-describing API for accessing catalog metadata.

## <a id="permissions" />How information schema system tables handle permissions

`system.information_schema` differs from other system tables in that it implements automatic filtering. This means you see only the objects (catalogs, schemas, tables, columns, etc.) that you have privileges to access in Unity Catalog. If your privileges change, what you see in the information schema changes accordingly. For example, when you query `information_schema.tables`, only rows for tables you have permission to see are returned.

Unlike other system tables, the information schema does not require an explicit `SELECT` grant. Access is governed automatically by your Unity Catalog privileges. You see only the objects that you already have permission to access.

## Entity relationship diagram of the information schema

The following entity relationship (ER) diagram provides an overview of a subset of information schema views and how they relate to each other.

![ER diagram of information schema](https://docs.databricks.com/aws/en/images/sql/information-schema.png)

## Information schema views

| Name                                                                                                                                               | Description                                                                                                                                                                                                                                    |
| -------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [ABAC\_POLICY\_DEFINITIONS](https://docs.databricks.com/aws/en/sql/language-manual/information-schema/abac_policy_definitions.md)                  | Describes attribute-based access control (ABAC) policies attached to securables in the catalog.                                                                                                                                                |
| [CATALOG\_PRIVILEGES](https://docs.databricks.com/aws/en/sql/language-manual/information-schema/catalog_privileges.md)                             | Lists [principals](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-principal.md) that have [privileges](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-privileges.md) on the catalogs.                          |
| [CATALOG\_PROVIDER\_SHARE\_USAGE](https://docs.databricks.com/aws/en/sql/language-manual/information-schema/catalog_provider_share_usage.md)       | Describes provider share mounted onto catalogs.                                                                                                                                                                                                |
| [CATALOG\_TAGS](https://docs.databricks.com/aws/en/sql/language-manual/information-schema/catalog_tags.md)                                         | Contains tags that have been applied to the catalogs.                                                                                                                                                                                          |
| [CATALOGS](https://docs.databricks.com/aws/en/sql/language-manual/information-schema/catalogs.md)                                                  | Describes catalogs.                                                                                                                                                                                                                            |
| [CHECK\_CONSTRAINTS](https://docs.databricks.com/aws/en/sql/language-manual/information-schema/check_constraints.md)                               | Reserved for future use.                                                                                                                                                                                                                       |
| [COLUMN\_MASKS](https://docs.databricks.com/aws/en/sql/language-manual/information-schema/column_masks.md)                                         | Describes column masks on table columns in the catalog.                                                                                                                                                                                        |
| [COLUMN\_TAGS](https://docs.databricks.com/aws/en/sql/language-manual/information-schema/column_tags.md)                                           | Contains column tagging metadata within a table.                                                                                                                                                                                               |
| [COLUMNS](https://docs.databricks.com/aws/en/sql/language-manual/information-schema/columns.md)                                                    | Describes columns of tables and views in the catalog.                                                                                                                                                                                          |
| [CONNECTION\_PRIVILEGES](https://docs.databricks.com/aws/en/sql/language-manual/information-schema/connection_privileges.md)                       | Lists [principals](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-principal.md) that have [privileges](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-privileges.md) on the foreign connections.               |
| [CONNECTIONS](https://docs.databricks.com/aws/en/sql/language-manual/information-schema/connections.md)                                            | Describes foreign connections.                                                                                                                                                                                                                 |
| [CONSTRAINT\_COLUMN\_USAGE](https://docs.databricks.com/aws/en/sql/language-manual/information-schema/constraint_column_usage.md)                  | Describes the constraints referencing columns in the catalog.                                                                                                                                                                                  |
| [CONSTRAINT\_TABLE\_USAGE](https://docs.databricks.com/aws/en/sql/language-manual/information-schema/constraint_table_usage.md)                    | Describes the constraints referencing tables in the catalog.                                                                                                                                                                                   |
| [CREDENTIAL\_PRIVILEGES](https://docs.databricks.com/aws/en/sql/language-manual/information-schema/credential_privileges.md)                       | Lists [principals](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-principal.md) that have [privileges](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-privileges.md) on the credentials.                       |
| [CREDENTIALS](https://docs.databricks.com/aws/en/sql/language-manual/information-schema/credentials.md)                                            | Describes credentials.                                                                                                                                                                                                                         |
| [EXTERNAL\_LOCATION\_PRIVILEGES](https://docs.databricks.com/aws/en/sql/language-manual/information-schema/external_location_privileges.md)        | Lists [principals](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-principal.md) that have [privileges](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-privileges.md) on the external locations.                |
| [EXTERNAL\_LOCATIONS](https://docs.databricks.com/aws/en/sql/language-manual/information-schema/external_locations.md)                             | Describes external locations.                                                                                                                                                                                                                  |
| [INFORMATION\_SCHEMA\_CATALOG\_NAME](https://docs.databricks.com/aws/en/sql/language-manual/information-schema/information_schema_catalog_name.md) | Returns the name of this information schema's catalog.                                                                                                                                                                                         |
| [KEY\_COLUMN\_USAGE](https://docs.databricks.com/aws/en/sql/language-manual/information-schema/key_column_usage.md)                                | Lists the columns of the primary or foreign key constraints within the catalog.                                                                                                                                                                |
| [METASTORE\_PRIVILEGES](https://docs.databricks.com/aws/en/sql/language-manual/information-schema/metastore_privileges.md)                         | Lists [principals](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-principal.md) that have [privileges](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-privileges.md) on the current metastore.                 |
| [METASTORES](https://docs.databricks.com/aws/en/sql/language-manual/information-schema/metastores.md)                                              | Describes the current metastore.                                                                                                                                                                                                               |
| [PARAMETERS](https://docs.databricks.com/aws/en/sql/language-manual/information-schema/parameters.md)                                              | Describes parameters of routines (functions) in the catalog.                                                                                                                                                                                   |
| [PROVIDERS](https://docs.databricks.com/aws/en/sql/language-manual/information-schema/providers.md)                                                | Describes providers.                                                                                                                                                                                                                           |
| [RECIPIENT\_ALLOWED\_IP\_RANGES](https://docs.databricks.com/aws/en/sql/language-manual/information-schema/recipient_allowed_ip_ranges.md)         | Lists allowed IP ranges for recipients.                                                                                                                                                                                                        |
| [RECIPIENT\_TOKENS](https://docs.databricks.com/aws/en/sql/language-manual/information-schema/recipient_tokens.md)                                 | Lists tokens for recipients.                                                                                                                                                                                                                   |
| [RECIPIENTS](https://docs.databricks.com/aws/en/sql/language-manual/information-schema/recipients.md)                                              | Describes recipients.                                                                                                                                                                                                                          |
| [REFERENTIAL\_CONSTRAINTS](https://docs.databricks.com/aws/en/sql/language-manual/information-schema/referential_constraints.md)                   | Describes referential (foreign key) constraints defined in the catalog.                                                                                                                                                                        |
| [ROUTINE\_COLUMNS](https://docs.databricks.com/aws/en/sql/language-manual/information-schema/routine_columns.md)                                   | Describes result columns of table valued functions.                                                                                                                                                                                            |
| [ROUTINE\_PRIVILEGES](https://docs.databricks.com/aws/en/sql/language-manual/information-schema/routine_privileges.md)                             | Lists [principals](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-principal.md) that have [privileges](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-privileges.md) on the routines in the catalog.           |
| [ROUTINES](https://docs.databricks.com/aws/en/sql/language-manual/information-schema/routines.md)                                                  | Describes routines (functions) in the catalog.                                                                                                                                                                                                 |
| [ROW\_FILTERS](https://docs.databricks.com/aws/en/sql/language-manual/information-schema/row_filters.md)                                           | Describes row filters on tables in the catalog.                                                                                                                                                                                                |
| [SCHEMA\_PRIVILEGES](https://docs.databricks.com/aws/en/sql/language-manual/information-schema/schema_privileges.md)                               | Lists [principals](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-principal.md) that have [privileges](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-privileges.md) on the schemas in the catalog.            |
| [SCHEMA\_TAGS](https://docs.databricks.com/aws/en/sql/language-manual/information-schema/schema_tags.md)                                           | Contains schema tagging metadata within the schema.                                                                                                                                                                                            |
| [SCHEMA\_SHARE\_USAGE](https://docs.databricks.com/aws/en/sql/language-manual/information-schema/schema_share_usage.md)                            | Describes the schemas referenced in shares.                                                                                                                                                                                                    |
| [SCHEMATA](https://docs.databricks.com/aws/en/sql/language-manual/information-schema/schemata.md)                                                  | Describes schemas within the catalog.                                                                                                                                                                                                          |
| [SHARE\_RECIPIENT\_PRIVILEGES](https://docs.databricks.com/aws/en/sql/language-manual/information-schema/share_recipient_privileges.md)            | Describes the recipients granted access to shares.                                                                                                                                                                                             |
| [SHARES](https://docs.databricks.com/aws/en/sql/language-manual/information-schema/shares.md)                                                      | Describes shares.                                                                                                                                                                                                                              |
| [STORAGE\_CREDENTIAL\_PRIVILEGES](https://docs.databricks.com/aws/en/sql/language-manual/information-schema/storage_credential_privileges.md)      | \[Deprecated] Lists [principals](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-principal.md) that have [privileges](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-privileges.md) on the storage credentials. |
| [STORAGE\_CREDENTIALS](https://docs.databricks.com/aws/en/sql/language-manual/information-schema/storage_credentials.md)                           | \[Deprecated] Describes storage credentials.                                                                                                                                                                                                   |
| [TABLE\_CONSTRAINTS](https://docs.databricks.com/aws/en/sql/language-manual/information-schema/table_constraints.md)                               | Describes metadata for all primary and foreign key constraints within the catalog.                                                                                                                                                             |
| [TABLE\_PRIVILEGES](https://docs.databricks.com/aws/en/sql/language-manual/information-schema/table_privileges.md)                                 | Lists [principals](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-principal.md) that have [privileges](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-privileges.md) on the tables and views in the catalog.   |
| [TABLE\_SHARE\_USAGE](https://docs.databricks.com/aws/en/sql/language-manual/information-schema/table_share_usage.md)                              | Describes the tables referenced in shares.                                                                                                                                                                                                     |
| [TABLE\_TAGS](https://docs.databricks.com/aws/en/sql/language-manual/information-schema/table_tags.md)                                             | Contains table tagging metadata within a table.                                                                                                                                                                                                |
| [TABLES](https://docs.databricks.com/aws/en/sql/language-manual/information-schema/tables.md)                                                      | Describes tables and views defined within the catalog.                                                                                                                                                                                         |
| [VIEWS](https://docs.databricks.com/aws/en/sql/language-manual/information-schema/views.md)                                                        | Describes view specific information about the views in the catalog.                                                                                                                                                                            |
| [VOLUMES](https://docs.databricks.com/aws/en/sql/language-manual/information-schema/volumes.md)                                                    | Describes volumes defined in the catalog.                                                                                                                                                                                                      |
| [VOLUME\_PRIVILEGES](https://docs.databricks.com/aws/en/sql/language-manual/information-schema/volume_privileges.md)                               | Lists [principals](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-principal.md) that have [privileges](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-privileges.md) on the volumes in the catalog.            |
| [VOLUME\_TAGS](https://docs.databricks.com/aws/en/sql/language-manual/information-schema/volume_tags.md)                                           | Contains volume tagging metadata applied to a volume.                                                                                                                                                                                          |

## Notes

* The information schema implements privilege-aware filtering. You automatically see only the objects you have Unity Catalog permissions to access. See [How information schema system tables handle permissions](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-information-schema.md#permissions).
* A manual sync using `REPAIR TABLE` may be required for some catalog metadata changes to be reflected in the information schema. For more information, see [REPAIR TABLE](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-ddl-repair-table.md).
* All identifiers **except** column and tag names are stored in the information schema as lowercase `STRING`.
  For query performance, avoid using functions like `LOWER()` or `UPPER()` on the identifier column. Instead, compare identifiers directly using lowercase values.
* To prevent query timeouts, apply selective filters when querying the information schema (e.g. `WHERE table_catalog = 'main' AND table_schema = 'default'`). Refer to the documentation above for a full list of columns that can be used as filters for each Information Schema table.
  * Note that `LIMIT` pushdown is not currently supported, so although it can truncate the results it will not improve performance.

## Examples

```sql
> SELECT table_name, column_name
    FROM information_schema.columns
    WHERE data_type = 'DOUBLE'
      AND table_schema = 'information_schema';
```

The following are examples of workflows that use the system level information schema tables.

If you want to view all tables that have been created in the last 24 hours, your query could look like the following.

```sql
> SELECT table_name, table_owner, created_by, last_altered, last_altered_by, table_catalog
    FROM system.information_schema.tables
    WHERE  datediff(now(), last_altered) < 1;
```

If you want to view how many tables you have in each schema, consider the following example.

```sql
> SELECT table_schema, count(table_name)
    FROM system.information_schema.tables
    WHERE table_schema = 'tpch'
    GROUP BY table_schema
    ORDER BY 2 DESC
```

## Related articles

* [SHOW](https://docs.databricks.com/aws/en/sql/language-manual/index.md#show-statements)
* [DESCRIBE](https://docs.databricks.com/aws/en/sql/language-manual/index.md#describe-statements)
