Loading lesson path
Concept visual
Start at both ends
❮ SQL Keywords
In SQL, a view is a virtual table based on the result set of an SQL statement.
command creates a view. The following SQL creates a view that selects all customers from Brazil:
CREATE VIEW [Brazil Customers] AS
CustomerName, ContactName
Country = "Brazil";We can query the view above as follows:
SELECT * FROM [Brazil
Customers];command updates a view. The following SQL adds the "City" column to the "Brazil Customers" view:
CREATE OR REPLACE VIEW [Brazil Customers] AS SELECT CustomerName, ContactName, City
WHERE Country = "Brazil";command deletes a view. The following SQL drops the "Brazil Customers" view:
DROP VIEW [Brazil Customers];❮ SQL Keywords