display alternate records in sql ? code example
Example 1: how to get alternate records from a table in sql
Select studentId from
(Select rowno, studentId from student) where mod(rowno,2)=1
Example 2: How can you get the alternate records from the table in the SQL?
SELECT EmpId from (SELECT rowno,EmpId from Emp) WHERE mod(rowno,2)=1;