I've used SQL in couple databases engines from time to time several years but have little theoretical knowledge so my question could be very "noobish" for some of you. But it become important to me now so I have to ask.
Imagine table Urls with non unique column status
. And for the question assume that we have large amount of rows and status has the same value in every record.
And imagine we execute many times query:
SELECT * FROM Urls ORDER BY status
Do we get every time the same row order or not? If we do what will happen if we add some new rows? Does it change order or new records will be appended to end of the results? And if we don't get the same order - on what conditions depend this order?
Do
ROW_NUMBER() OVER (ORDER BY status)
will return the same order as query above or it is based on different ordering mechanism?