Hi friends,
What will be the query to Display Odd/ Even number of records in oracle
Thanks
Hi friends,
What will be the query to Display Odd/ Even number of records in oracle
Thanks
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Satyapriya NayakPosted Nov 26, 2011, 2:18 AM
Welcome to c-sharpcorner community.
Here is your query
Even number of records:
select * from emp where (rowid,0) in (select rowid, mod(rownum,2) from emp)
Odd number of records:
select * from emp where (rowid,1) in (select rowid, mod(rownum,2) from emp);
Thanks
If this post helps you mark it as answer