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 do you retrieve the last N records from a table?

Answer Posted / kiran penujuri

This Will give you last 10 records from a table

SELECT EMPNAME,SALARY
FROM
(SELECT EMPNAME,
SALARY,
RANK() OVER(ORDER BY SALARY) SAL_RANK
FROM EMP)
WHERE SAL_RANK < = 10

Is This Answer Correct ?    1 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which data dictionary views have the information on the triggers that are available in the database?

1182


What are all different types of collation sensitivity?

975


Why do we need cursors in pl sql?

1005


Is sql better than access?

965


What are reports usually used for?

969


How do I count duplicates in sql?

1033


What is cte?

924


Can we declare a column having number data type and its scale is larger than pricesionex: column_name number(10,100),column_name numbaer(10,-84)

896


Why trigger is used in sql?

917


What is the use of & in pl sql?

988


How do I make my sql query run faster?

893


What is normalisation and its types?

957


Can one improve the performance of sql*loader? : aql loader

983


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

1301


Is a view faster than a stored procedure?

903