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)


Now from the temp table we select the row where rowid=2 as required

id = 2

kick it on

Shout it

pimp it

Anky Goyal

I am MCPD certified in .NET and working on .NET technologies for past 3yrs. I am very passionate about the new features which get introduced in the technology. I am here to share the new features i get to know in the world of Microsoft. Follow me on twitter @ankygoyal [email protected]Ankit Goyal

More Posts - Website

  • Pingback: DotNetBurner - SQL Server()

  • Pingback: DotNetShoutout()

  • Pingback:

  • Original post by Dmitri Gromov

    • 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.

  • This is the turn Query to get a particular row in Sql Server 2005 | Techartifact blog for anyone who wants to seek out out most this content. You observation so more its near debilitating to converse with you (not that I really would want…HaHa). You definitely put a new twirl on a theme thats been holographic most for years. Prissy block, only great!

  • This is the penalize Query to get a particular row in Sql Server 2005 | Techartifact diary for anyone who wants to essay out out almost this matter. You mention so often its nigh effortful to contend with you (not that I real would want…HaHa). You definitely put a new rotation on a matter thats been cursive roughly for years. Squeamish shove, simply eager!

  • Wow, superb blog layout! How long have you been blogging for? you made blogging look easy. The overall look of your site is great, let alone the content!. Thanks For Your article about Query to get a particular row in Sql Server 2005 | Techartifact .

  • MMO

    Simply wanna comment on few general things, The website design is perfect, the articles is real wonderful. “The sun sets without thy assistance.” by The Talmud.

  • I like this site very much, Its a rattling nice place to read and incur information. “The absence of war is not peace.” by Harry S Truman.

  • Keep up the good work , I read few articles on this website and I conceive that your site is real interesting and has sets of good info .