Bug #2816 | Sorting Incorrect | ||
---|---|---|---|
Submitted: | 15 Feb 2004 21:56 | Modified: | 16 Feb 2004 0:50 |
Reporter: | Wahid Sabbir | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server | Severity: | S1 (Critical) |
Version: | 4.0.15-standard | OS: | Linux (Linux) |
Assigned to: | CPU Architecture: | Any |
[15 Feb 2004 21:56]
Wahid Sabbir
[15 Feb 2004 23:12]
Apachez
You forgot a "ORDER BY" in your query.
[15 Feb 2004 23:47]
Wahid Sabbir
If you have read the description well then you would have noticed that I mentioned about the 'ORDER BY' clause. Ok it's true that if I add a 'ORDER BY news_id' to the SQL statement the ordering is ok, then how does the rows are ordered when a 'SELECT' SQL query is run without the 'ORDER BY' clause and why does the row jumped up/down.
[16 Feb 2004 0:50]
Alexander Keremidarski
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.mysql.com/documentation/ and the instructions on how to report a bug at http://bugs.mysql.com/how-to-report.php Additional info: Due to basic requirements of Relational Model tables in *any* relational database have no internal order. When ORDER BY is not specified server can return rows in any order and even decide it different every time you run the query. You wrote: "... then how does the rows are ordered when a 'SELECT' SQL query is run without the 'ORDER BY' ..." This is wrong from client perspective. When client sends query without ORDER BY the is instructed that client don't care about the order.