control question from DB2 v9 certification book:
in the following SQL statements are execute in the order shown:
create table orders
(col1 interger not null,
col2 varchar(35),
col3 numeric(5,2));
create unique index idx_col1 ON orders(col1);
which of the following describe the resulting behavior?
A. every COL1 value entered must be unique; whenever the orders table is queried rows should be displayed in order of increasing COL1 values;
B. every COL1 value entered must be unique; whenever the orders table is queried rows will be displayed in no particular order;
C....
D....
I am pretty sure the correct answer is B, but in the book it is A. Am I crazy?
The explanation in the book is:
.. the creation of an index provides a logical ordering of the rows for a table so in this example, rows inserted into the orders table will be ordered COL1 values, in ascending order.