how to find the particular row in table?(means suppose one
table contain 10 rows , in these 10 rows how to find the
particular row(example in 10 rows i want 5 row how)?
Answer Posted / owen
-- I believe the questionner wants the 5th row
-- (only) from the data.
-- I also assume we don't have a useful ID to work with.
-- This is one way of doing it without cursors:
select top 1 <fieldname>
from <TableName>
where <fieldname> not in
(select top 5 <fieldname>
from <TableName>)
-- NB Changing the "5" in the subquery above sets which
-- row number is returned
| Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
How to change the data type of an existing column with "alter table" statements in ms sql server?
What are tables in sql server?
What does it mean to normalize a database and why would you do it?
Explain aggregate functions?
what are the basic functions for master, msdb, model, tempdb and resource system databases? : sql server database administration
your sql server is running out of disk space. You notice that there are several large files with ldf extensions what are these files? : Sql server administration
Explain alternate key, candidate key and composite key in sql server?
What is data source view or dsv? : sql server analysis services, ssas
How to use “drop” keyword in sql server and give an example?
What are the limitations in ssrs on sql server express edition?
Explain what is lock escalation and what is its purpose?
how to define testing of network layers? : Sql server database administration
What is the difference between sql server 2000 object owner and sql server 2005 schema? : sql server database administration
Explain collation?
Find nth lowest salary or get nth lowest salary?