How to select the First row from a MySQL table


You can use the following command to get the first row from a MySQL table:

SELECT * FROM table LIMIT 1

Explanation:

table - table name

By limiting the returns to 1 (LIMIT 1) we get the first row from the table.

Example:

SELECT * FROM tusers LIMIT 1

  • email
  • Add to favorites
  • Facebook
  • Twitter
  • MySpace
  • del.icio.us
  • LinkedIn
  • Digg
  • StumbleUpon
  • Google Bookmarks
  • Yahoo! Buzz
  • IndianPad
  1. #1 by Buzanga on July 13th, 2009

    Ora vossa excelência não partilhou com os amigos a existência deste espaço – mas como estes são muito inteligentes (ou em linguagem mais acutalizada – bué da smarts) chegaram cá.

    Estou gostando, pode ser que com um pouquito mais de tempo venha cá ler os posts todos e quiça experimentar :D

    Buz

  2. #2 by Joan Parker on July 23rd, 2009

    Thanks for posting about this, I would like to read more about this topic.

(will not be published)

  1. No trackbacks yet.