Sql create view

This article is tagged with: Sql create view and mysql

how to create a view in sql

CREATE VIEW view_name AS
SELECT column1, column2, ...
FROM table_name
WHERE condition;

sql create view

CREATE VIEW view_name AS
SELECT column1, column2, ...
FROM table_name
WHERE condition;

creating view in sql

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';

create view

CREATE VIEW view_name AS SELECT id,category,MAX(created_at),content,title FROM table WHERE condition GROUP BY category

This article is tagged with: Sql create view and mysql