


The following statement uses the LIKE clause to find all views from the sys database, whose names start with the waits: SHOW FULL TABLES FROM sys LIKE 'waits%' If you want to get views that match a pattern, you can use the LIKE clause as follows: SHOW FULL TABLES In this syntax, you specify a database name from which you want to get the views after the FROM or IN clause.įor example, the following statement shows all views from the sys database: SHOW FULL TABLES IN sys WHERE table_type= 'VIEW' If you want to show all views from another database, you can use the FROM or IN clause as follows: SHOW FULL TABLES Therefore, to show all views in the current database, you use the SHOW FULL TABLES statement as follows: SHOW FULL TABLES WHERE table_type = 'VIEW' Ĭode language: SQL (Structured Query Language) ( sql )īecause the SHOW FULL TABLES statement returns both tables and views, you need to add a WHERE clause to get the views only. MySQL treats the views as tables with the type 'VIEW'. MySQL Show View – using SHOW FULL TABLES statement
#Tableplus view sql print how to
Summary: in this tutorial, you will learn how to show all views in a MySQL database by using the SHOW FULL TABLE statement or by querying information from the data dictionary.
