I have a table with a PK clustered index as well as other indexes on it, both unique and non-unique. If I issue (exactly):
SELECT * FROM table_name
or
SELECT col1, col2 FROM table_name
in what order will the rows be returned?
This is the first question in an interview questionnaire a customer has forwarded us. Here are the instructions:
If the answer to this question is incorrect, terminate the interview immediately! The individual, regardless of their stated ability does not understand SQL-Based relational database management systems. This is SQL-101 logic for the past 25+ years. The correct answer is: “unknown/random/undetermined because no ORDER BY clause was specified as part of the query”.
I am somehow not convinced that this is actually correct. All comments welcome.
Thanks,
Raj
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…