Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2008
    Posts
    4

    Unanswered: New Row Insertion

    Hi there,

    if i have a table having columns "id","date","content". Now i want to extract 10 latest records. So for that do i have to first extract all record and order them in DESC by date or is it possible just to get last 10 records as new records will always be inserted in the end.

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    the former -- ORDER BY `date` DESC LIMIT 10
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Sep 2008
    Posts
    4
    Thx alot mate

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •