On this page
SHOW VIEWS
Core command
SH VI
SHVI
Lists the views whose schema and name contain the text you type.
Syntax
SHOW VIEWS [[<schema>.]<name>]
Arguments
| Argument | Required | Values | Default |
|---|---|---|---|
<name> | No | Text the view name contains; % matches any text | Every view |
<schema>. | No | Text the schema name contains, followed by a dot | The current schema |
Examples
SHOW VIEWS;
SHOW VIEWS CUSTOMER;
SHOW VIEWS CUSTOM%;
SHOW VIEWS PUBLIC.CUSTOMER;
SHOW VIEWS PUB%.CUSTOMER;
SHOW VIEWS PUB%.%STOME%;
Details
Matching
The same rules as SHOW TABLES: the schema part and the name part are each a "contains" search, and a % inside the text matches any text.
- Without a name, every view is listed.
- Without a schema, only the connection's current schema is searched, not every schema.
What is listed
Views, and materialized views on databases that have them (PostgreSQL). Views are never listed by SHOW TABLES. Synonyms are listed by neither command.
Related
Last modified in release 5.5.0.
Found something wrong or unclear on this page? Tell us, with the page address.