Select query order

From: Krithinarayanan Ganesh Kumar <krithinarayanan(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Select query order
Date: 2010-03-24 12:06:08
Message-ID: 61940faf1003240506n5154f4fr81f7e9d983f6761d@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi All,

I am aware that Select query does not guarantee the order of the rows
returned ( The rows are returned in whatever order the system finds fastest
to produce).

Is there any way to SELECT the rows in the same order of insertion ? The
problem is there is no Primary Key in the table, I am having only a
composite key. So I cannot ORDER BY pk also.

I tried row_number() over () Window function but not of use

Thanks & Regards
Krithi

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Sean Davis 2010-03-24 12:13:42 Re: Select query order
Previous Message Ireneusz Pluta 2010-03-23 14:53:50 Re: Calculating database sizes using a script