Note
This view is available starting with V5.0.1.
Overview
This view is used to provide external keyword query capabilities.
Columns
Column |
Type |
Is NULL |
Description |
|---|---|---|---|
| KEYWORD | varchar(128) | NO | Keyword name |
| LENGTH | bigint(20) | NO | Length of keywords |
| TYPE | varchar(16) | NO | Keyword type. The current value can only beSQLorPL |
| RESERVED | bigint(20) | NO | Whether it is a reserved keyword. |
Usage instructions
This view may be used to check whether a string can be used as an identifier. However, in the current implementation of OceanBase Database, a small number of non-reserved keywords cannot actually be used as identifiers.
The following non-reserved keywords cannot be used as identifiers in MySQL-compatible mode:
Notice
These keywords are not universally prohibited. For example, some cannot be used as table aliases but can be used as column names. It is recommended that you avoid using these keywords when creating objects, table names, or column names where identifiers are required.
EXCEPTINTERSECTMINUSMEMBERSOUNDSWINDOW
Sample query
obclient > SELECT * FROM oceanbase.V$OB_KEYWORDS limit 5;
The query result is as follows:
+------------+--------+------+----------+
| KEYWORD | LENGTH | TYPE | RESERVED |
+------------+--------+------+----------+
| accessible | 10 | SQL | 1 |
| add | 3 | SQL | 1 |
| all | 3 | SQL | 1 |
| alter | 5 | SQL | 1 |
| analyze | 7 | SQL | 1 |
+------------+--------+------+----------+
