Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> In Clause selecting in reverse order, wonder why?
Hi,
I am running a query using an "in clause" in the condition. When no
order clause is given, the query selects the rows in the reverse order
in which the ids appears in the in clause.
for example when I say select * from a_table where a_id in (1, 3, 9,
4);
the rows are selected in the order where a_id is 4, 9, 3, 1.
Tried with shuffling the ids and it always selects in the reverse
order of whatever is provided.
My query is:
1) Is it a standard behaviour? (of oracle, of sql)
2) Can I base my code upon this behaviour?
Thanks,
-Deepesh
Received on Mon Mar 07 2005 - 12:09:36 CST