Computer >> Hướng Dẫn Máy Tính >  >> Lập Trình >> MySQL

Cách lấy danh sách View trong MySQL?

Truy vấn INFORMATION_SCHEMA.TABLES lọc TABLE_TYPE = 'VIEW'.

Cú pháp

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

Kết quả

Hiển thị 100 view hệ thống (schema sys): version, innodb_buffer_stats_by_schema, schema_object_overview, ...