how to create a view in sql
snippet in sql

how to create a view in sql

user3538


CREATE VIEW view_name AS

SELECT column1, column2, ...

FROM table_name

WHERE condition; 

creating view in sql

user1127

The following SQL creates a view that shows all customers from Brazil:

CREATE VIEW [Brazil Customers] AS
SELECT CustomerName, ContactName
FROM Customers
WHERE Country = 'Brazil';