Received: from candle.pha.pa.us (candle.navpoint.com [162.33.245.46] (may be forged)) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f1NLJhx06635 for ; Fri, 23 Feb 2001 16:19:45 -0500 (EST) (envelope-from pgman@candle.pha.pa.us) Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id QAA28623; Fri, 23 Feb 2001 16:18:16 -0500 (EST) From: Bruce Momjian Message-Id: <200102232118.QAA28623@candle.pha.pa.us> Subject: Re: Controlling Reuslts with Limit In-Reply-To: <3A9822F2.FF9437C9@mondo-live.com> "from Najm Hashmi at Feb 24, 2001 04:09:06 pm" To: Najm Hashmi Date: Fri, 23 Feb 2001 16:18:16 -0500 (EST) CC: pgsql X-Mailer: ELM [version 2.4ME+ PL77 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Archive-Number: 200102/367 X-Sequence-Number: 1566 > 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, Pennsylvania 19026