SUM() 函数的使用

This commit is contained in:
GuanM 2024-11-19 15:21:51 +08:00
parent cb3e0fd205
commit 00c9df9497

View File

@ -0,0 +1,16 @@
USE Mall
GO
SET NOCOUNT ON
------ return the amount of all products ------
-- ********** Begin ********** --
SELECT SUM(prod_price * quantity) as amount
FROM Products
-- ********** End ********** --
GO