select top 1 * from ( select top 2 * from abc order by id desc )sub order by id asc
it will select top 2nd from bottom
for seleting top 3rd from above
select top 1 * from ( select top 3 * from abc order by id asc )sub order by id desc
from Top
select top 1* from (select Top 4 id from test1 order by id asc) sub order by id desc
from Bottom
select top 1* from (select Top 4 id from test1 order by id desc) sub order by id asc
it will select top 2nd from bottom
for seleting top 3rd from above
select top 1 * from ( select top 3 * from abc order by id asc )sub order by id desc
from Top
select top 1* from (select Top 4 id from test1 order by id asc) sub order by id desc
from Bottom
select top 1* from (select Top 4 id from test1 order by id desc) sub order by id asc
No comments:
Post a Comment