我发现的最佳答案:
SELECt*FROM ( SELECt list.*, @counter := @counter +1 AS counter FROM (select @counter:=0) AS initvar, list ORDER BY value DESC ) AS Xwhere counter <= (10/100 * @counter);ORDER BY value DESC
将10更改为其他百分比。
欢迎分享,转载请注明来源:内存溢出
我发现的最佳答案:
SELECt*FROM ( SELECt list.*, @counter := @counter +1 AS counter FROM (select @counter:=0) AS initvar, list ORDER BY value DESC ) AS Xwhere counter <= (10/100 * @counter);ORDER BY value DESC
将10更改为其他百分比。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)