Select Top (all but 10) from ... in Microsoft Access

Joel Spolsky picture Joel Spolsky · Feb 5, 2009 · Viewed 18.6k times · Source

Say I've got a query

SELECT TOP 10 ... FROM ... ORDER BY ...

in Access (well, really Jet). The question is: how can I get all the other rows... everything except the top 10?

Answer

Wayne Molina picture Wayne Molina · Feb 5, 2009

Couldn't you do something like

SELECT ... FROM ...
WHERE PK NOT IN (SELECT TOP 10 PK FROM ...)
ORDER BY ...

it might not be that efficient but that's the only way off the top of my head I can think to do something like that. AFAIK there's no "BOTTOM" clause in SQL :)