-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Aolin <[email protected]>
- Loading branch information
Showing
4 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
title: KEYWORDS | ||
summary: 了解 INFORMATION_SCHEMA 表 `KEYWORDS`。 | ||
--- | ||
|
||
# KEYWORDS | ||
|
||
TiDB 从 v7.6.0 开始提供 `KEYWORDS` 表,你可以使用该表查看[关键字](/keywords.md)的信息。 | ||
|
||
```sql | ||
USE INFORMATION_SCHEMA; | ||
DESC keywords; | ||
``` | ||
|
||
输出结果如下: | ||
|
||
``` | ||
+----------+--------------+------+------+---------+-------+ | ||
| Field | Type | Null | Key | Default | Extra | | ||
+----------+--------------+------+------+---------+-------+ | ||
| WORD | varchar(128) | YES | | NULL | | | ||
| RESERVED | int(11) | YES | | NULL | | | ||
+----------+--------------+------+------+---------+-------+ | ||
2 rows in set (0.00 sec) | ||
``` | ||
|
||
下面的 SQL 语句查询 `ADD` 和 `USER` 关键字的信息: | ||
|
||
```sql | ||
SELECT * FROM keywords WHERE WORD IN ('ADD','USER'); | ||
``` | ||
|
||
输出结果显示 `ADD` 是一个保留关键字,`USER` 是一个非保留关键字。 | ||
|
||
``` | ||
+------+----------+ | ||
| WORD | RESERVED | | ||
+------+----------+ | ||
| ADD | 1 | | ||
| USER | 0 | | ||
+------+----------+ | ||
2 rows in set (0.00 sec) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters