Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How One can easily select all even, odd, or Nth rows from a
table using SQL queries?

Answer Posted / mahesh

SIMPLE ODD AND EVEN...

SQL> SELECT ROWNUM FROM EMP GROUP BY ROWNUM HAVING MOD(ROWNUM,2)=1
2 /

ROWNUM
----------
1
3
5


1* SELECT ROWNUM FROM EMP GROUP BY ROWNUM HAVING MOD(ROWNUM,2)=0
2 /

ROWNUM
----------
2
4
Goahead...

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we join more than 2 tables in sql?

1010


How to assign sql query results to pl sql variables?

1066


Explain the components of sql?

1050


Where is pl sql used?

948


How do I start sql from command line?

1013


Explain the difference between cursor declared in procedures and cursors declared in the package specification?

1131


What do you mean by stored procedures? How do we use it?

993


Does oracle roll back the transaction on an error?

1002


What are different sql data types?

1030


What is left join in sql?

1043


how to calculate the difference between two dates? : Sql dba

1050


What is sql query optimization?

1102


How many types of functions are there in sql?

941


what is oracle database ? : Sql dba

1014


What is the difference between an inner and outer join?

1006