Purpose
The statement switches the catalog.
Note
For OceanBase Database V4.3.5, the SET CATALOG statement is supported starting from V4.3.5 BP2.
Privilege requirements
To execute the SET CATALOG statement, the current user must have the USE CATALOG privilege. For more information about privileges in OceanBase Database, see Privilege types in Oracle-compatible mode.
Syntax
SET CATALOG {INTERNAL | external_catalog_name};
Parameters
| Parameter | Description |
|---|---|
| INTERNAL | Indicates switching to the system's internal catalog. |
| external_catalog_name | Specifies the name of the external data catalog to switch to. |
Examples
Switch to the external data catalog named
test_odps_catalog.SET CATALOG test_odps_catalog;Switch to the system internal catalog.
SET CATALOG INTERNAL;