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 is normalisation and its types?

990


Explain commit, rollback and savepoint.

983


What are sql functions? Describe the different types of sql functions?

1126


What is not null in sql?

1040


define data blocks ? : Sql dba

971


Why is nosql good?

1008


What are the parts of a sql statement?

1072


What is the left table in sql?

954


What are aggregate and scalar functions?

1005


How many sql are there?

977


What does (*) mean in sql?

942


Is join and inner join the same?

991


What is rowid in sql?

967


How many sql databases can you have on one server?

1064


what is a cursor? : Sql dba

1005