It returns the first five rows it finds. Running the same
query over again if there are no updates is safe, but if the
table is updated there is the possibility it would find a different
five rows. If the query would do a seq scan and you updated
a row, the rows would be in a different order in
Najm Hashmi <[EMAIL PROTECTED]> writes:
> I just want to know what exatly --"LIMIT without ORDER BY returns random rows
> from the query" --means
It means the results aren't guaranteed. It doesn't mean that the exact
same query run under the exact same conditions by the exact same version
of Po
> I don't think it is actually random. It just that the order is not defined
> and other events may change the order. I believe that without an ORDER BY
> or other clauses that cause an index to be used that the database tends to
> return rows in the order stored on disk. This order tends to be
My understanding:
because you return a subset instead of a single value,
so between 2 select ... limit ... queries.
if you delete a record(say song_id=947) then insert it again.
then results are different.
So for a multiple users db, you should use oder by when you use limit.
Jie LIANG
St. Bern
> 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. "
>
> When I run a query several time I get t
> 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 wi