v_TakeOut.sql
资源名称:SQLVC.rar [点击查看]
上传用户:biney012
上传日期:2022-05-09
资源大小:4592k
文件大小:0k
源码类别:
数据库系统
开发平台:
Visual C++
- USE Stock
- GO
- CREATE VIEW dbo.v_takeout
- AS
- SELECT p.Pid, SUM(t.Pnum) AS SumNum, SUM(t.Pnum * t.Pprice)
- AS SumPrice
- FROM dbo.Product p INNER JOIN
- dbo.TakeOut t ON p.Pid = t.Pid
- GROUP BY p.Pid
- GO