MySQL Forums
Forum List  »  InnoDB

Re: Does LIMIT 1 without ORDER BY ID bring the record with minimum ID?
Posted by: Panayotis Matsinopoulos
Date: May 04, 2012 02:46AM

Thank you. Very informative answer.

The question came to my mind when reading this:

http://guides.rubyonrails.org/active_record_querying.html

On section "1.1.2 first", it says that first generates "SELECT * from clients LIMIT 1" without "order by id" and I was sure that this couldn't be correct SQL for getting the row with minimum id (this is what first is supposed to do).

That is why I tried to find the answer through MySQL forum.

Your answer, again, was really informative. I believe that I now have to create a new issue/bug on Rails/ActiveRecord/MySQL implementation.

Panayotis

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Does LIMIT 1 without ORDER BY ID bring the record with minimum ID?
1771
May 04, 2012 02:46AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.