Curriculum
Course: SQL
Login

Curriculum

SQL

SQL References

0/80

MySQL Functions

0/139

SQL Server Functions

0/84

SQL Quick Ref

0/1
Text lesson

CREATE OR REPLACE VIEW

CREATE OR REPLACE VIEW

The CREATE OR REPLACE VIEW command alters a view. In the given SQL, it incorporates the “City” column into the “Brazil Customers” view.

Example

CREATE OR REPLACE VIEW [Brazil Customers] AS
SELECT CustomerName, ContactName, City
FROM Customers
WHERE Country = “Brazil”

Query The View

To retrieve data from the aforementioned view, we can execute the following query.

Example

SELECT * FROM [Brazil Customers];