Problem solve Get help with specific problems with your technologies, process and projects.

Selecting alternate records

Use this tip to find alternate or even/odd records.

To find alternate or even/odd records, use this query:

select * from (select emp.* ,rownum k from emp ) where mod(k,2)=0;

select * from (select emp.* ,rownum k from emp ) where mod(k,2)<>0;

By using above query, you can get alernative rows.

For More Information


Dig Deeper on Oracle and SQL

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide.com

SearchDataCenter

SearchContentManagement

SearchHRSoftware

Close