- 情感问答
- 答案列表
mysql查询最大值:mysql查询最大值记录[朗读]
下面的sql就可以:selectv,count(*)from表名groupby1havingcount(*)>2注意,上面的语句查找>2的,就是两次的不显示,3次及以上的才显示,如果重复就显示的话应该写>1。
$result=mysql_query("selectmax(price)fromprice");$row=myspl_fetch_array($result,mysql_num);$pmin=$row[0];
select*from表orderby要最大值的字段desclimit0,10。
selectnumber,causefromsettingorderbynumberdesclimit1;
select*fromtable_nameorderbyleveldesclimit0,3;