SCHEMATA
Applies to: Databricks SQL
Databricks Runtime 10.4 LTS and above
Unity Catalog only
INFORMATION_SCHEMA.SCHEMATA describes schemas within the catalog.
The rows returned are limited to the schemas the user has permission to interact with.
Definition
The SCHEMATA
relation contains the following columns:
Name | Data type | Nullable | Standard | Description |
---|---|---|---|---|
CATALOG_NAME |
STRING |
No | Yes | Catalog containing the schema. |
SCHEMA_NAME |
STRING |
No | Yes | Name of the schema. |
SCHEMA_OWNER |
STRING |
No | No | User or group (principal) that currently owns the schema. |
COMMENT |
STRING |
Yes | No | An optional comment that describes the relation. |
CREATED |
TIMESTAMP |
No | No | Timestamp when the relation was created. |
CREATED_BY |
STRING |
No | No | Principal which created the relation. |
LAST_ALTERED |
TIMESTAMP |
No | No | Timestamp when the relation definition was last altered in any way. |
LAST_ALTERED_BY |
STRING |
No | No | Principal which last altered the relation. |
Constraints
The following constraints apply to the TABLES
relation:
Class | Name | Column List | Description |
---|---|---|---|
Primary key | SCHEMATA_PK |
CATALOG_NAME , SCHEMA_NAME |
Unique identifier for the schema. |
Foreign key | SCHEMATA_CATS_FK |
CATALOG_NAME |
References CATALOGS. |
Examples
> SELECT schema_owner
FROM information_schema.schemata
WHERE table_schema = 'information_schema'
AND table_name = 'default';
system
Related
Σχόλια
https://aka.ms/ContentUserFeedback.
Σύντομα διαθέσιμα: Καθ' όλη τη διάρκεια του 2024 θα καταργήσουμε σταδιακά τα ζητήματα GitHub ως μηχανισμό ανάδρασης για το περιεχόμενο και θα το αντικαταστήσουμε με ένα νέο σύστημα ανάδρασης. Για περισσότερες πληροφορίες, ανατρέξτε στο θέμα:Υποβολή και προβολή σχολίων για