Create View
CREATE VIEW vw_Names
AS
SELECT ProductName, Price FROM Products;
GO
Create View
CREATE VIEW vw_Names
AS
SELECT ProductName, Price FROM Products;
GO
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