Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
5 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.7k 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

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...