Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in SQL by (20.3k points)

I can do SELECT TOP (200) ... but why not BOTTOM (200)?

Well not to get into philosophy what I mean is, how can I do the equivalent of TOP (200) but in reverse (from the bottom, like you'd expect BOTTOM to do...)?

1 Answer

0 votes
by (40.4k points)

Try using the code given below:

SELECT columns

FROM (SELECT TOP 200 columns

     FROM

          My_Table

     ORDER BY

          a_column DESC

) SQ

ORDER BY   a_column ASC

Related questions

+1 vote
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Browse Categories

...