Quantcast
Channel: MySQL Forums - InnoDB
Viewing all articles
Browse latest Browse all 1957

Does LIMIT 1 without ORDER BY ID bring the record with minimum ID? (no replies)

$
0
0
According to this:

http://forums.mysql.com/read.php?21,239471,239688#msg-239688

InnoDB returns the rows in PRIMARY KEY order.

Does this stand true if you put LIMIT at the end? In other words:

Does

SELECT * from MYTABLE LIMIT 1;

bring always the record with the minimum id? Or shall I put ORDER BY ID before LIMIT?

Thanks in advance.

Panayotis

Viewing all articles
Browse latest Browse all 1957

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>