Search code examples
sqlms-accessjet

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


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?


Solution

  • 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 :)