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
Explain about Views?
Does server sql treat char as a variable-length or fixed-length column?
How can I create a new template for import ? : sql server management studio
What is the purpose of indexing?
Can we call stored procedure in trigger?
How exceptions can be handled in sql server programming?
what is hash nonclustered index
Explain system views?
What will be the maximum number of indexes per table?
What are the different subsets of sql?
1.what is the diff between nolock optimizer and read uncommitted isolation? 2.what is the diff between revoke and deny? 3.what is percieved down time? 4.whether password protection are required for backups?if yes why?if no why? 5.what is fill factor? 6.what is cost analysis? 7.what is mean by piece meal restore? 8.what is 'rowguidcol'? 9.impersonate permission? 10.what is selectivity?
What is difference between sql and sql server?
What are the Advantages of using CTE in sql server?
What is data compression? : sql server database administration
Mention the different types of triggers?