Creating views

You can create two types of views:.

You can create two types of views:

  • CREATE VIEW creates a view that persists across all sessions until it is explicitly dropped with DROP VIEW

  • CREATE LOCAL TEMPORARY VIEW creates a view that is accessible only during the current Vertica session, and only to its creator. The view is automatically dropped when the current session ends.

After you create a view, you cannot change its definition. You can replace it with another view of the same name; or you can delete and redefine it.

Permissions

To create a view, a non-superuser must have the following privileges:

Privilege Objects
CREATE Schema where the view is created
DROP The view (only required if you specify an existing view in CREATE OR REPLACE VIEW)
SELECT Tables and views referenced by the view query
USAGE All schemas that contain tables and views referenced by the view query

For information about enabling users to access views, see View Access Permissions.