Re: Controlling Reuslts with Limit - Mailing list pgsql-sql

From Bruce Momjian
Subject Re: Controlling Reuslts with Limit
Date
Msg-id 200102232118.QAA28623@candle.pha.pa.us
Whole thread Raw
In response to Controlling Reuslts with Limit  (Najm Hashmi <najm@mondo-live.com>)
List pgsql-sql
> Hi,
>  I was reading through Bruce's on line . I found follwing bit unclear...
> 
> "Notice that each query uses ORDER BY . Although this clause is not required,
> LIMIT without ORDER BY returns random rows from the query, which would be
> useless. "

It means there is no guarantee which rows will be returned.  You may get
the rows you want, or you may not.  Without the ORDER BY, the backend
can return any five rows it wishes.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-sql by date:

Previous
From: Jie Liang
Date:
Subject: Re: Need your help
Next
From: "Bryan White"
Date:
Subject: Re: Controlling Reuslts with Limit