此查询结果一列包含许多行,每个单元格包含一个数字:
SELECT B.Bil_Total_Remain
FROM Bill_Sales B
JOIN Customer C ON B.Bil_Cus_Id=C.Cus_Id AND C.Cus_name = 'asd'
如何在查询结果中检索最大数量?
答案 0 :(得分:2)
select max(B.Bil_Total_Remain) as your_max_value
from Bill_Sales B
join Customer C on B.Bil_Cus_Id=C.Cus_Id
and C.Cus_name = 'asd'