Purpose
This statement is used to switch catalogs.
Privilege requirements
To execute the SET CATALOG statement, the current user must have the USE CATALOG privilege. For more information about OceanBase AI Database privileges, see Permission classification.
Syntax
SET CATALOG {INTERNAL | external_catalog_name};
Parameters
Parameters |
Description |
|---|---|
| INTERNAL | Indicates switching to the internal system catalog. |
| external_catalog_name | Specifies the name of the external data directory to switch to. |
Note
You can use use internal.test or use odps_catalog.default to switch the catalog and database in one operation.
Examples
Switch to the external data catalog
test_odps_catalog.SET CATALOG test_odps_catalog;Switch to the system's internal catalog.
SET CATALOG INTERNAL;