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 / murthy

declare @n int
set @n=5
select top (@n) * from employees
except
select top (@n-1) * from employees
GO

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you explain how long are locks retained within the repeatable_read and serializable isolation levels, during a read operation with row-level locking?

742


Explain what are the events recorded in a transaction log?

737


Why does sql studio use a single registered database repository? : sql server management studio

687


Write an SQL query to obtain the 2nd highest salary.

797


What is a view and what are its advantages?

855






How do I create a partition table in sql server?

730


What are the purpose of Normalisation?

800


Every night you run a full backup after every 3 three hours you make a differential backup every hour you make an incremental backup in a worst-case scenario, how much work you can lose?

696


Which are the two editions in which SQL Azure database available?

115


What are the advantages of stored procedure in sql server?

636


What is “begin trans”, “commit tran”, “rollback tran” and “savetran”?

766


Please differentiate between a local and a global temporary table?

755


What is a database in ms sql server?

735


Can we use where clause in union?

791


What is scalar user-defined function?

718