0 votes
1 view
in SQL by (22.4k 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.3k 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
asked Jul 10, 2019 in SQL by Tech4ever (22.4k points)
Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...