MAX() 函数和 MIN() 函数的使用

This commit is contained in:
GuanM 2024-11-19 15:22:59 +08:00
parent 00c9df9497
commit 1a2212ad54

View File

@ -0,0 +1,15 @@
USE Mall
GO
SET NOCOUNT ON
------ return the price of the least expensive item ------
-- ********** Begin ********** --
SELECT prod_name, prod_price
FROM Products
WHERE prod_price = (SELECT MIN(prod_price) FROM Products)
-- ********** End ********** --
GO