0
如何选择只有一行已在colum1
最高值,也确保所选择的colum1
值大于ňMySQL与大于子句一起选择最大值?
SELECT * FROM thetable WHERE colum1 >= 150 ORDER BY amount LIMIT 1
//using limit to get 1 row
//using where to fulfill greathe-than criteria
//using order by to sort and get max one.
上面的查询是给大于150行但不是表的最大值之一,查询中出现了什么问题?
您将需要'ORDER BY量DESC'。 –