Controlling Reuslts with Limit

Поиск
Список
Период
Сортировка
От Najm Hashmi
Тема Controlling Reuslts with Limit
Дата
Msg-id 3A9822F2.FF9437C9@mondo-live.com
обсуждение исходный текст
Ответы Re: Controlling Reuslts with Limit  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: Controlling Reuslts with Limit  (Jie Liang <jliang@ipinc.com>)
Re: Controlling Reuslts with Limit  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Controlling Reuslts with Limit  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Список 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. "

When I run a query several time  I get the same results as given
flipr=# select song_id from songs  limit 5;
 song_id
---------
     945
     946
     947
     948
     949
(5 rows)

flipr=# select song_id from songs  limit 5;
 song_id
---------
     945
     946
     947
     948
     949
(5 rows)

flipr=# select song_id from songs  limit 5;
 song_id
---------
     945
     946
     947
     948
     949
(5 rows)

flipr=# select song_id from songs  limit 5;
 song_id
---------
     945
     946
     947
     948
     949
(5 rows)

flipr=# select song_id from songs  limit 5;
 song_id
---------
     945
     946
     947
     948
     949
(5 rows)

flipr=# select song_id from songs  limit 5;
 song_id
---------
     945
     946
     947
     948
     949
 I just want to know what exatly --"LIMIT without ORDER BY returns random rows
from the query" --means
Regards

Вложения

В списке pgsql-sql по дате отправления:

Предыдущее
От: "tjk@tksoft.com"
Дата:
Сообщение: Re: How can i escape a '+' or a '+' in a regexp ?
Следующее
От: Jie Liang
Дата:
Сообщение: Re: Need your help