How to select nth record from a table?
Answer Posted / mohan krishna
declare @querry nvarchar(500)
declare @row varchar(10)
set @row = '5'
set @querry ='
select top 1 a.* from
(select * from vdpmaster..usermaster
where usr_id not in
(select top '
set @querry = @querry + @row + ' usr_id from
vdpmaster..usermaster)
)a'
print @querry
EXEC sp_executesql @querry
| Is This Answer Correct ? | 3 Yes | 4 No |
Post New Answer View All Answers
as a general practice, it is recommended to have dbo be the owner of all database objects however, in your database you find number of tables owned by a user other than dbo, how could you fix this? : Sql server administration
How to delete duplicate rows in sql server?
How many types of triggers in sql server?
Is sql server difficult to learn?
What is the difference between clustered and a non-clustered index?
What is the partitioning method?
Explain hostprotectionattribute in sql server 2005?
Explain filestream storage of sql server 2008?
What programming language would you use to create embedded functions in ssrs?
Is the order of columns in the set clause important in ms sql server?
Can you please differentiate between a primary key and a unique key?
What is merge join?
How is a full-text index updated?
Define outer join?
Explain the microsoft sql server delete command? : SQL Server Architecture