how do we find every fifth record in a table

Answer Posted / vicky

Assuming there are 3 columns in the table emp1

select id, name ,salary from ( select id,name ,salary,
mod(rownum,5) as r from emp1) where r=0

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to execute a sql statement using mssql_query()?

537


How to list all user names in a database?

578


explain different types of backups avaialabe in sql server? Given a particular scenario, how would you go about choosing a backup plan? : Sql server database administration

578


What are the new scripting capabilities of ssms? : sql server management studio

534


what is the different types of backups available in sql server? : Sql server database administration

489






Why I can not enter 0.001 second in date and time literals in ms sql server?

525


How and why use sql server?

530


What is history table in sql server?

492


What are data resources?

494


I applied Transactional with updatable subscriptions replication on 2 tables now i want to delete those 2 tables but i cannot delete those tables as replication is running how can i stop replication for those 2 tables(but i don't want to delete those replicated tables but i need to stop the replication) how can i do that

1426


what are triggers? : Sql server database administration

489


Is foreign key unique?

565


How to update muliple row in single query?

601


What is auditing in sql server?

493


What is meant by referential integrity?

577