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 / jyoti

We can retrieve last N records using Order by clause in the
query.

The ORDER BY clause using DESC
then give limits 0,N
for ex: SELECT * from table_name OREDER BY id DESC limit 0,10

It will return you last 10 records of the table.

Is This Answer Correct ?    1 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between syntax error and runtime error?

1064


what are all types of user defined functions? : Sql dba

995


what is a join? : Sql dba

960


What is pls_integer in pl sql?

1029


What is a subquery in sql?

974


give the syntax of grant and revoke commands? : Sql dba

1087


How to run sql statements through the web interface?

983


What are the disadvantages of file system?

1162


How long does it take to learn pl sql?

999


How to read xml file in oracle pl sql?

859


how tsql statements can be written and submitted to the database engine? : Transact sql

921


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

2057


what is the difference between a web-garden and a web-farm? : Sql dba

1009


What is a delimiter in sas?

977


What are triggers in sql?

971