SELECT * FROM SectionQuestion WHERE SectionID = 5When those rows are retrieved, am I always guaranteed that they will be retrieved in the same order (as long as no indexed column is added to the table, or more rows added with a SectionID of 5)?
After a couple of test queries, the answer appears to be yes, but I'd like a definitive answer 







teammatt3 posted this at 19:08 — 11th July 2008.
He has: 1,902 posts
Joined: Sep 2003
And yes, I know that I could add another column that contains the order in it, but that's not my question.
My Site | Regular Expression Tester
Greg K posted this at 19:26 — 11th July 2008.
He has: 1,664 posts
Joined: Nov 2003
try deleting out a row from the middle of the ones returned to you, then add another row.
I did this earlier today, and it put the new record where the one I just deleted was.
When you need to make sure it is the same, give it rules to follow to make sure can (add PK or Order field and sort with it).
-Greg
[This space intentionally left blank]
Cool Geek Supplies: www.ThinkGeek.com
teammatt3 posted this at 16:54 — 16th July 2008.
He has: 1,902 posts
Joined: Sep 2003
I experienced the same behavior. I'm still unsure if I'm always guaranteed that will happen but I guess I'll take my chances.
My Site | Regular Expression Tester