MySQL Forums
Forum List  »  General

Re: how to find continuous row of same value
Posted by: Peter Brawley
Date: May 20, 2016 08:04AM

> please do not apply order by on query,
> otherwise we will not get expected result.

Sorry, that's nonsense.

Without an Order By clause, order is undefined and unpredictable. That's a fundamental feature of relational databases: storage order is irrelevant to query results.

So you will need to define an ordering for your query. If you have been counting on order of insert, you will need to add a timestamp column, or a programmed ordering integer, to enforce the desired order.

Options: ReplyQuote


Subject
Written By
Posted
Re: how to find continuous row of same value
May 20, 2016 08:04AM


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.