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