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

What is dml with example?

1154


how can we destroy the session, how can we unset the variable of a session? : Sql dba

1047


Which are the different types of indexes in sql?

1098


What is implicit cursor in pl sql?

1145


Define union, minus, union all, intersect ?

1063


Is oracle sql free?

1037


what are date and time data types in mysql? : Sql dba

1020


What is function and procedure in pl sql?

1114


What does the acronym acid stand for in database management?

1087


How many sql statements are used? Define them.

1076


Can we call a function containing dml statements in a select query?

1023


What is pragma in pl sql?

1182


How to change a value of the field ‘salary’ as 7500 for an employee_name ‘john’ in a table employee_details?

1489


What is minus?

1051


What are the three forms of normalization?

1092