Mysql
 SQL >> Database >  >> RDS >> Mysql

Recuperare ultime quattro righe da result set MySQL

Usa una derived table con ORDER BY DESC LIMIT 4 e poi riordina esternamente.

SELECT x.value FROM (SELECT y.value FROM TABLE y ORDER BY y.value DESC LIMIT 4) x ORDER BY x.value;