In this article we will look into how to write a sql query to get a particular row in sql.
Lets write the code to find 2nd row in a table named mcc_measures.
So first we declare a temporary table
declare @temp table (id int)
No in this temp table we insertrow numbers of the table
insert into @temp(id) SELECT ROW_NUMBER() over(ORDER BY Measure_Id DESC) FROM mcc_measures
Now from the temp table we select the row where rowid=2 as required
SELECT * FROM @temp WHERE id = 2

KattyBlackyard
Original post by Dmitri Gromov
Ankit Goyal
Hi KattyBlackYard,
Well the query written above is very basic query and i do not know what Dmitri Gromov has written on the topic.
Please provide me the URL of the article you are talking of, so that i can send pingbacks to it.