List views in Vertica database with their scripts

This query returns list of non-system views in a database with their definition.

Query

select table_schema as view_schema,
       table_name as view_name,
       view_definition,
       create_time
from v_catalog.views
order by table_schema,
         table_name;

Columns

  • schema_name - schema name
  • view_name - view name
  • view_definition - definition of the view
  • create_time - view creation datetime

Rows

  • One row represents one view
  • Scope of rows: all non-system views in a database
  • Ordered by schema and view name

Sample results

Comments are only visible when the visitor has consented to statistics cookies. To see and add comments please accept statistics cookies.
0
There are no comments. Click here to write the first comment.