sql create view
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;
Create View
CREATE VIEW vw_Names
AS
SELECT ProductName, Price FROM Products;
GO
create view
CREATE VIEW view_name AS SELECT id,category,MAX(created_at),content,title FROM table WHERE condition GROUP BY category
create view
CREATE VIEW sales.daily_sales
AS
SELECT
year(order_date) AS y,
month(order_date) AS m,
day(order_date) AS d,
p.product_id,
product_name,
quantity * i.list_price AS sales
FROM
sales.orders AS o
INNER JOIN sales.order_items AS i
ON o.order_id = i.order_id
INNER JOIN production.products AS p
ON p.product_id = i.product_id;
Code language: SQL (Structured Query Language) (sql)
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us