Hi,
SQL standard does not define the order of the duplicate rows and sqlite does not either. I would really not depend on a thing like this, even if the rows are in fact retrieved in the same order they were inserted (some DB systems I know of do this). If you need the rows retrieve Rows in a specific order, it is a good idea to use a column C3 or the integer primary key.
Martin
Michael Knigge schrieb:
Hi,
is the order, in which rows with duplicate keys are retrieved, specified?
For example: A table with two columns - the first is a Index. If I INSERT in the following order:
C1 C2 ----- 3 1 1 1 1 2 1 1 1 3 2 1
If I now do a "SELECT * FROM Table ORDER BY C1;", is it guranteed that the rows with identical "C1" are retrieved in "FIFO" order, as
1 1 1 2 1 1 1 3 2 1 3 1
Or is it somehow undefined?!?!?
Thanks, Michael