Create View SQL Tutorial

Create View Syntax:

CREATE VIEW my_view_name AS
SELECT column_name(s)
FROM my_table_name
WHERE condition

Create View Example:

Sales table:

IDPRICENAME
1200A
2500B
3900C
4500D

CREATE VIEW sales_view AS
SELECT id, price, name
FROM sales
WHERE price=500;

Create View Result:

IDPRICENAME
2500B
4500D