Does a SELECT query always return rows in the same order? Clustered Index Table

Will my select * query always return rows from my database table in the same order?

My table has a "clustered index" in one column. Will this change the answer?

+6
source share
1 answer

The order of the returned rows will not always be the same unless you explicitly specify this with the ORDER BY . So no.

And no; simply because your 1000 requests returned the same order, that does not guarantee that the 1001st request will be in the same order.

+16
source

Source: https://habr.com/ru/post/910081/


All Articles