Skip site navigation (1) Skip section navigation (2)

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: (view raw or whole 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


pgsql-novice by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group