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

0 votes
1 answer
asked Dec 9, 2020 in SQL by Appu (6.1k points)
0 votes
2 answers
0 votes
1 answer
0 votes
1 answer

1.2k questions

2.7k answers

501 comments

693 users

Browse Categories

...