MySQL/Postgres gebruiken:
SELECT t.name,
t.price,
t.change
FROM TABLE t
ORDER BY t.change DESC
LIMIT 5
LIMIT
clausule:
SQL Server gebruiken:
SELECT TOP 5
t.name,
t.price,
t.change
FROM TABLE t
ORDER BY t.change DESC
TOP
wordt minstens ondersteund op SQL Server 2000+
Oracle:
SELECT x.*
FROM (SELECT t.name,
t.price,
t.change
FROM TABLE t
ORDER BY t.change DESC) x
WHERE ROWNUM <= 5
Oracle's ROWNUM