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 / bikash khuntia

select * from (
select rownum rw,bk.sal from
(select sal from TEMP_SAL order by rowid desc) bk) bik
where bik.rw<=3

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to write a query to show the details of a student from students table whose

942


What is sql resultset?

934


How does one use sql*loader to load images, sound clips and documents? : aql loader

1119


What is the use of index in sql?

961


what is foreign key? : Sql dba

971


How do you determine the current isolation level? : Transact sql

1074


Can we join two tables without common column?

932


What is the difference between local and global temporary table?

990


What is on delete restrict?

945


Differentiate between syntax and runtime errors.

1120


How do I install microsoft sql?

984


What is the default isolation level in sql server? : Transact sql

964


What does trigger mean in slang?

1007


What is the difference between left join and right join?

889


What is the advantage of index in sql?

917