Will my select * query always return the rows from my database table in the same order?
My table has a ‘clustered index’ on one column. Does that change the answer?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The order of the returned rows will not always be the same unless you explicitly state so with the
ORDER BYclause. So, no.And no; just because your 1000 queries have returned the same order it’s no guarantee the 1001th query will be in the same order.