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
What are character string data types in ms sql server?
What is the purpose of linked server configuration in sql server?
What is change tracking in sql server?
What is nolock?
How to list all schemas in a database?
Suggest a method of joining two tables.
What is a unique key constraint?
How to send a ssrs report from ssis?
Explain data warehousing in sql server?
What are the steps you will take to improve the performance of a poor performing query?
What are joins in sql and what are the different types of joins?
what are statistics, under what circumstances they go out of date, how do you update them? : Sql server database administration
What are types of scd? : sql server analysis services, ssas
Does partitioning improve performance?
What is a database table?