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 last tree records from table?
select *from emp where rownum > (select count(*)-3 from
emp);
i am using this query to get last three records from table
but its not giving any output, so please tell me what is the
error in this query.

Answer Posted / ajit nayak

select *from emp
minus
select *
from emp
where rownum <= (select count(*)-3 from
emp);

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are pl sql procedures?

966


How consistent is the view of the data between and within multiple sessions, transactions or statements ?

2172


how many groups of data types? : Sql dba

974


What is bitemporal narrowing?

1231


Is sql developer case sensitive?

945


Can you have more than one key in a database?

893


How to rename a column in the output of sql query?

1005


How you can copy a file to file content and file to pl/sql table in advance pl/sql?

1094


List and explain the different types of join clauses supported in ansi-standard sql?

1301


what is row? : Sql dba

1168


What is the difference between jpql and sql?

1024


How do you write a complex sql query?

1011


What is cursor and its types?

996


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

2072


What are the 3 modes of parameter?

1103