how do we find every fifth record in a table

Answer Posted / satya gupt

select salary from emp e where 4=(select count(salary) from
emp where salary>e.salary

Is This Answer Correct ?    1 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a select query statement in ms sql server?

576


What is sql server database?

494


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?

615


What you can do to delete a table without the delete trigger firing?

517


What are scalar functions in sql?

603






How to create an inline table-valued function?

529


What is conditional split?

537


How will you add a dimension to cube? : sql server analysis services, ssas

550


Tell me in brief how sql server enhances scalability of the database system?

518


Can we use max in where clause?

507


How to list all schemas in a database?

569


Can a stored procedure call itself or recursive stored procedure? How much level sp nesting is possible?

607


What is entity data services?

574


How to provide login information for a new odbc dsn?

536


Can the “if update (colname)” statement be used in a delete trigger?

548