CREATE VIEW

Description

This command creates a view in a database, which is run every time the view is referenced in a query. Using the WITH NO SCHEMA BINDING clause, you can create views to an external table or objects that don't exist yet. This clause, however, requires you to specify the qualified name of the object or table that you are referencing.

Grammar Syntax

The following is the SQL syntax to create a view in Amazon Redshift. Click here to here to go to Redshifts specification for this syntax.

CREATE [ OR REPLACE ] VIEW name [ ( column_name [, ...] ) ] AS query
[ WITH NO SCHEMA BINDING ]               

Sample Code

Considering the obligatory and optional clauses in Redshifts command, the output after migration to Snowflake is very similar.

create or replace view myuser
as 
select lastname from users;

There are some exceptions, however, of one unsupported clause from Redshift, therefore an EWI was implemented to cover this case.

Last updated