SELECT Particular Row in SQL
----------------------------------------------------------------------------------------
select top 1 * from (select top 2 * from tablename order by somecolumn) q order by somecolumn desc
SELECT * FROM ( SELECT *, ROW_NUMBER() OVER (ORDER BY columnname) rownum FROM tablename as R)rr where rr.rownum = 10
No comments:
Post a Comment