How do you select alternate rows from a SQL table?

AnswerBot
2y

Select alternate rows from SQL

  • Use the modulo operator to filter alternate rows

  • Add a WHERE clause with the modulo operator

  • Example: SELECT * FROM table WHERE id % 2 = 0

  • Example: SELECT * FROM table WHERE...read more

Ashfaque Rashid
2y

select * from (select rownum as Rnum, A.* from employee A) where mod(Rnum,2) = 1; It will give odd records only from the table

select * from (select rownum as Rnum, A.* from employee A) where mod(Rnum...read more

Help your peers!
Select
Add answer anonymously...

Mphasis Module Lead interview questions & answers

A Module Lead was asked 2w agoQ. What are the changes in memory management in Java 8?
A Module Lead was asked 2w agoQ. What are the disadvantages of microservices?
A Module Lead was asked 3mo agoQ. How can duplicate characters be identified in a string using a single loop?

Popular interview questions of Module Lead

A Module Lead was asked 1w agoQ1. How do you configure the framework to automatically execute failed test cases?
A Module Lead was asked 1w agoQ2. How do you execute a test suite with a large number of automation scripts in a s...read more
A Module Lead was asked 2w agoQ3. What are the disadvantages of microservices?
Mphasis Module Lead Interview Questions
Stay ahead in your career. Get AmbitionBox app
play-icon
play-icon
qr-code
Trusted by over 1.5 Crore job seekers to find their right fit company
80 L+

Reviews

10L+

Interviews

4 Cr+

Salaries

1.5 Cr+

Users

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2025 Info Edge (India) Ltd.

Follow Us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter
Profile Image
Hello, Guest
AmbitionBox Employee Choice Awards 2025
Winners announced!
awards-icon
Contribute to help millions!
Write a review
Write a review
Share interview
Share interview
Contribute salary
Contribute salary
Add office photos
Add office photos
Add office benefits
Add office benefits