It is a principle of SQL databases that the underlying tables have no natural or guaranteed order to their records. You must specify the order in which you want to see the records when SELECT
ing from a table using an ORDER BY
clause.
You can obtain the records you want using SELECT * FROM your_table ORDER BY RunTime
, and that is the correct and reliable way to do this in any SQL database.
If you want to attempt to get the records in Pass_2
to "be" in RunTime order, you can add the ORDER BY
clause to the SELECT
you use to create the table but remember: you are not guaranteed to get the records back in the order in which they were added to the table.
When might you get the records back in a different order? This is most likely to happen when your query can be answered using columns in a covering index -- in that case the records are more likely to be returned in index order than any "natural" order (but again, no guarantees with an ORDER BY
clause).