This is mainly a reference post for myself as it took a few tries to get correct Google queries to find the answers I’m after.
What is the natural/default sort order records will be returned from a query on a SQL Server table that does not specify an explicit sort order?
There is no guarantee of the sort order.
Often it will return records in the order you inserted them, sometimes it won’t.
If you want to guarantee an order to the returned records, provide an ORDER BY clause in the query.
- Google: “what is the default ordering of rows returned from a select query?”
- Google: “sql server query natural sort without order site:stackoverflow.com”