Search Postgresql Archives

Re: ORDER BY results

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Howard Cole <howardnews@xxxxxxxxxxxxx> writes:
> I have a query which presents results sorted using the SQL  "ORDER BY... 
> LIMIT". Now my question is...  if the column that the order refers to 
> has some repeated data, will the order of results always be the same?

No.  You need to add more columns to the ORDER BY clause to ensure a
unique ordering, if you want to be sure of that.

(For sufficiently small values of "always", such as if the table hasn't
been updated in between, the results may appear stable ... but it's not
guaranteed.)

			regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux