Received: from internet1.infortrade.com.br ([200.212.88.131]) by postgresql.org (8.11.3/8.11.1) with SMTP id f3QJIv311614 for ; Thu, 26 Apr 2001 15:18:58 -0400 (EDT) (envelope-from jpedro@infortrade.com.br) Received: (qmail 7597 invoked by alias); 26 Apr 2001 19:23:10 -0000 Received: from unknown (HELO comp) (200.212.88.158) by internet1.infortrade.com.br with SMTP; 26 Apr 2001 19:23:10 -0000 Message-ID: <001701c0ce85$b988dae0$06ffa8c0@infortrade.com.br> From: "Joao Pedro M. F. Monoo" To: References: Subject: Re: random rows Date: Thu, 26 Apr 2001 16:18:49 -0300 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 X-Archive-Number: 200104/411 X-Sequence-Number: 2773 Hi! > How I can return random N rows from my select stmt? > like: > e.g. what my selectee is a set of 1000 rows, I want randomly > pickup 100 of 1000. use the LIMIT clause example SELECT * FROM test_table LIMIT 100; you can also use the OFFSET clause to skip to n row and the fetch the n desired rows example SELECT * FROM test_table LIMIT 100 OFFSET 100; this will skip to row number 100 and the fetch the next 100 rows []īs --------------------------------------------- Joao Pedro M. F. Monoo Infortrade Information Systems #183816 Linux Registered User Slackware 7.1 running 2.4.2 Linux Kernel