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 to retrieve 1st and last row of table without using
group functions??

Answer Posted / sudipta santra

For the 1st row:

select * from emp where rownum<2 order by empno;

For the last row:

select * from emp where rownum<2 order by empno desc;

Is This Answer Correct ?    14 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you increase the OS limitation for open files (LINUX and/or Solaris)?

1928


What are temporal data types in oracle?

1116


What view(s) do you use to associate a users SQLPLUS session with his o/s process?

2351


Explain the difference between sap and oracle?

1027


How to create a new tablespace in oracle?

977


What are a cluster and non-cluster index?

1015


Difference between open_form and call_form in oracle.

1153


How to get a list of all user accounts in the database?

1085


How to display row numbers with the records?

1073


What is the difference between a hot backup and a cold backup in oracle?

1013


Explain integrity constraint?

1155


What is logical backup in oracle?

1012


how the indexes are stored in the Oracle Database?

2268


How to write date and time literals in oracle?

996


Is there a function to split a string in plsql?

1047