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

What are local and global Indexes and where they are useful.

1495


What is normalization in a database?

1198


Can we create clustered index without primary key?

1002


Explain dml and ddl?

1059


How do I view stored procedures?

1023


What is pragma in pl sql?

1188


What are the different types of a subquery?

1106


If i can use sys.check_constraints to display my constraints from my database using sql server 2005, how can i display then if i am using sql server 2000????

4061


How exception is different from error?

1068


what is union, minus and interact commands? : Sql dba

1257


What is meant by temporal data?

1004


What is memory optimized table?

1086


What is the clause we need to add in function body to return variable?

1055


What is identity column in sql server?

1102


Is sqlite free?

1024