xxxxxxxxxx
CREATE VIEW us_customers AS
SELECT customer_id, first_name
FROM Customers
WHERE Country = 'USA';
xxxxxxxxxx
CREATE VIEW view_name AS
SELECT column1, column2 ..
FROM table_name
WHERE [condition];
xxxxxxxxxx
CREATE VIEW view_name AS
SELECT column1, column2,
FROM table_name
WHERE condition;
xxxxxxxxxx
CREATE VIEW my_view_name AS
SELECT column1, column2,
FROM table_name
WHERE condition;
xxxxxxxxxx
-- don't miss AS
CREATE VIEW view_name AS
-- start select statement with condition
SELECT column1, column2 ..
FROM table_name
WHERE [condition];
xxxxxxxxxx
CREATE view us_customers as
SELECT user_id, first_name
FROM UserBase
WHERE first_name = 'James';