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:

ColumnDescription
TABLE_CATALOGAways def.
TABLE_SCHEMADatabase name containing the view.
TABLE_NAMEView table name.
VIEW_DEFINITIONDefinition of the view.
CHECK_OPTIONYES if the WITH CHECK_OPTION clause has been specified, NO otherwise.
IS_UPDATABLEWhether the view is updatable or not.
DEFINERAccount specified in the DEFINER clause (or the default when created).
SECURITY_TYPESQL SECURITY characteristic, either DEFINER or INVOKER.
CHARACTER_SET_CLIENTThe client character set when the view was created, from the session value of the character_set_client system variable.
COLLATION_CONNECTIONThe client collation when the view was created, from the session value of the collation_connection system variable.
ALGORITHMThe algorithm used in the view. See View Algorithms.

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

Comments

Comments loading...
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.