How to SELECT the last 10 rows of an SQL table which has no ID field?
Posted
by
Edward Tanguay
on Stack Overflow
See other posts from Stack Overflow
or by Edward Tanguay
Published on 2011-01-17T15:39:37Z
Indexed on
2011/01/17
15:53 UTC
Read the original article
Hit count: 253
I have an MySQL table with 25000 rows.
This is an imported CSV file so I want to look at the last ten rows to make sure it imported everything.
However, since there is no ID column, I can't say:
SELECT * FROM big_table ORDER BY id DESC
What SQL statement would show me the last 10 rows of this table?
The structure of the table is simply this:
columns are: A, B, C, D, ..., AA, AB, AC, ... (like Excel)
all fields are of type TEXT
© Stack Overflow or respective owner