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

What type of database is cloud sql?

1157


how do you know the version of your mysql server? : Sql dba

1046


Explain the order of sql statement execution?

1087


Explain the difference in execution of triggers and stored procedures?

1063


What is the use of stored procedures?

1105


what are the different type of sql's statements ? : Sql dba

978


how do you tune the slow running queries in oracle db , explain the methodology

3229


Explain polymorphism in pl/sql.

1171


How do I run a sql query in pgadmin 4?

999


what are the differences between public, private, protected, static, transient, final and volatile? : Sql dba

1092


What are all the common sql functions?

1084


What is the difference between delete and truncate statement in sql?

1128


What are inner outer left and right joins in sql?

1058


What are different types of triggers?

1180


what is a cursor? : Sql dba

1066