When I select a series of rows from a sql server 2005 table using an “order by” clause and then insert them into a different (and empty) sql server 2005 table can I count on the rows staying in the same order.
The reason I am asking is that I want to manipulate the rows using ADO.net. I want the rows in a specific order to improve the speed of the calculations I do using ADO.net.
Thanks for the help.
Relational databases work on unordered sets. These sets do not have an order unless you explicitly apply an order to them. If you want the same order in the second table as when you selected from the first, then you need to apply the equivalent
ORDER BYclause.