v_StoreIn.sql
资源名称:final.rar [点击查看]
上传用户:fangwenmm
上传日期:2014-06-18
资源大小:6955k
文件大小:0k
源码类别:
企业管理
开发平台:
Visual C++
- USE Stock
- GO
- CREATE VIEW dbo.v_storein
- AS
- SELECT p.Pid, SUM(i.Pnum) AS SumNum, SUM(i.Pnum * i.Pprice)
- AS SumPrice
- FROM dbo.Product p INNER JOIN
- dbo.StoreIn i ON p.Pid = i.Pid
- GROUP BY p.Pid
- GO