select * from myTable where myIndex = (select MAX(myIndex) from myTable);
select * from myTable order by myIndex asc limit 1;
Which one is more efficient?
By the way, one can also select the latest entries from a MySQL table with:
select * from myTable order by myIndex desc limit 4;
No comments:
Post a Comment