W3cubDocs

/MariaDB

Information Schema VIEWS Table

The Information Schema VIEWS table contains information about views. The SHOW VIEW privilege is required to view the table.

It has the following columns:

Column Description Added
TABLE_CATALOG Aways def.
TABLE_SCHEMA Database name containing the view.
TABLE_NAME View table name.
VIEW_DEFINITION Definition of the view.
CHECK_OPTION YES if the WITH CHECK_OPTION clause has been specified, NO otherwise.
IS_UPDATABLE Whether the view is updatable or not.
DEFINER Account specified in the DEFINER clause (or the default when created).
SECURITY_TYPE SQL SECURITY characteristic, either DEFINER or INVOKER.
CHARACTER_SET_CLIENT The client character set when the view was created, from the session value of the character_set_client system variable.
COLLATION_CONNECTION The client collation when the view was created, from the session value of the collation_connection system variable.
ALGORITHM The algorithm used in the view. See View Algorithms. MariaDB 10.1.3

Example

SELECT * FROM information_schema.VIEWS\G
*************************** 1. row ***************************
       TABLE_CATALOG: def
        TABLE_SCHEMA: test
          TABLE_NAME: v
     VIEW_DEFINITION: select `test`.`t`.`qty` AS `qty`,`test`.`t`.`price` AS `price`,(`test`.`t`.`qty` * `test`.`t`.`price`) AS `value` from `test`.`t`
        CHECK_OPTION: NONE
        IS_UPDATABLE: YES
             DEFINER: root@localhost
       SECURITY_TYPE: DEFINER
CHARACTER_SET_CLIENT: utf8
COLLATION_CONNECTION: utf8_general_ci
           ALGORITHM: UNDEFINED

See also

Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.

© 2019 MariaDB
Licensed under the Creative Commons Attribution 3.0 Unported License and the GNU Free Documentation License.
https://mariadb.com/kb/en/information-schema-views-table/