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

  1. #1 by Buzanga on July 13, 2009 - 12:55

    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 23, 2009 - 23:14

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

(will not be published)