- 情感問答
- 答案列表
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;