Without an ORDER BY clause, the order of rows returned by a SELECT is
Aalways ascending by primary key
Bnot guaranteed; may differ each run
Calways insertion order, oldest row first
Dalways alphabetical on the first column
Answer & Solution
Correct answer: B. not guaranteed; may differ each run
SQL is built on the relational model, where a relation is an unordered set.
The DBMS is free to return rows in whatever order is most efficient (which can change as the data grows or the optimiser picks a different plan).
To get a predictable order you must say so with ORDER BY.
Keep practising Database Management Systems
Browse all Database Management Systems questions for GATE CSE, or explore more Computer Science topics.