row order from select statement [message #371708] |
Mon, 27 November 2000 22:52 |
mango
Messages: 1 Registered: November 2000
|
Junior Member |
|
|
After I did the following transaction:
insert into t1 values(1);
insert into t1 values(2);
commit;
, I issued a Select statement as
select * from t1;
and got the result
T1
---
2
1
The question is why the result doesn't lie in the same order as the sequence of the transaction.
|
|
|
This is why... [message #371744 is a reply to message #371708] |
Fri, 01 December 2000 08:25 |
dUSTY-
Messages: 1 Registered: December 2000
|
Junior Member |
|
|
Because of how the definition of a database is made. It doesn't remember what the order it was to fill the database. If you want to order it you'll have to add a datefield to your table or use a field with an ID that only gets bigger. Then you can use the "Order By" function from SQL to get it into the right order.
-dUSTY
|
|
|