Note
This view is available starting with V1.4.
Purpose
Records view information.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| TABLE_CATALOG | varchar(64) | NO | The table catalog. |
| TABLE_SCHEMA | varchar(128) | NO | The database name. |
| TABLE_NAME | varchar(256) | NO | The view name. |
| VIEW_DEFINITION | longtext | NO | The view definition. |
| CHECK_OPTION | varchar(8) | NO | The check option. |
| IS_UPDATABLE | varchar(3) | NO | Indicates whether the view is updatable. |
| DEFINER | varchar(288) | NO | The username of the user who created the view. |
| SECURITY_TYPE | varchar(7) | NO | The security type. |
| CHARACTER_SET_CLIENT | varchar(64) | NO | The value of the character_set_client session variable when the view was created. |
| COLLATION_CONNECTION | varchar(64) | NO | The value of the collation_connection session variable when the view was created. |
Sample query
Query the details of the view v_test_tbl1.
obclient [infotest]> SELECT * FROM information_schema.VIEWS WHERE TABLE_NAME='v_test_tbl1'\G
The query result is as follows:
*************************** 1. row ***************************
TABLE_CATALOG: def
TABLE_SCHEMA: infotest
TABLE_NAME: v_test_tbl1
VIEW_DEFINITION: select `infotest`.`tbl6`.`col1` AS `col1`,`infotest`.`tbl6`.`col2` AS `col2` from `infotest`.`tbl6`
CHECK_OPTION: NONE
IS_UPDATABLE: YES
DEFINER: root@%
SECURITY_TYPE: NONE
CHARACTER_SET_CLIENT: utf8mb4
COLLATION_CONNECTION: utf8mb4_general_ci
1 row in set