You can use the information_schema.views view to return information about each view in a database. The view is available for each database and contains one row for each view in the database. You can use a SELECT query to return information about each view as shown in the example below.

To access information about views, you must have USAGE privileges on both the schema and the database. You also need ownership of the view or view-level privileges.

SELECT
  *
FROM
  information_schema.views;

Columns in information_schema.views

Each row has the following columns with information about each view.

Column NameData TypeDescription
table_catalogTEXTThe name of the catalog. Firebolt offers a single ‘default’ catalog.
table_schemaTEXTThe name of the database.
table_nameTEXTThe name of the view.
view_definitionTEXTThe query statement that defines the view.
check_optionNULLNot applicable for Firebolt.
is_updatableTEXTAlways NO.
insertable_intoTEXTAlways NO.
is_trigger_updatableTEXTAlways NO.
is_trigger_deletableTEXTAlways NO.
is_trigger_insertable_intoTEXTAlways NO.
createdTIMESTAMPTZTime that the view was created.
view_ownerTEXTThe owner of the view.
last_alteredTIMESTAMPTZTime that the view was last changed.
last_altered_byTEXTThe user who last altered this view.