Forum OpenACS Q&A: problem for sorting records in oracle 10g

Hi All,

I faced a problem with oracle 10g. I made a table with three records in which one column with 0 in all htree rows. when I tried to sort using this column I expect it to return the rows in the same fashion as it is entered because oracle 9i behaves this way, but oracle 10g treating it in different way and returning me row1,row3,row2 instaed of row1,row2,row3. can anybody tell me the reason behind this.

Thanks,
Mandar

Collapse
Posted by Brian Fenton on
Hi Mandar,

you should also use an ORDER BY clause if you need data sorted as otherwise you risk getting the data back in a random order. I think it was just a coincidence in Oracle 9i. See this article from Tom Kyte for more info http://tkyte.blogspot.com/2005/08/order-in-court.html

Brian