How to get a list of MySQL views?

后端 未结 9 1535
清歌不尽
清歌不尽 2020-11-28 20:12

I\'m looking for a way to list all views in a database.

Initially I found and tried an answer on the MySQL forums:

SELECT table_name
FROM information         


        
9条回答
  •  执笔经年
    2020-11-28 20:47

    Here's a way to find all the views in every database on your instance:

    SELECT TABLE_SCHEMA, TABLE_NAME 
    FROM information_schema.tables 
    WHERE TABLE_TYPE LIKE 'VIEW';
    

提交回复
热议问题