Re: [SQL] LIMIT
От | José Soares |
---|---|
Тема | Re: [SQL] LIMIT |
Дата | |
Msg-id | 372864D6.7FF6C7A0@sferacarta.com обсуждение исходный текст |
Ответы |
Re: [SQL] LIMIT
|
Список | pgsql-hackers |
<tt>Mark Jewiss ha scritto:</tt><blockquote type="CITE"><tt>> > Could someone give me an example of a select * withLIMIT</tt><br /><tt>> > used by 6.5?</tt><br /><tt>></tt><br /><tt>> SELECT * FROM foobar LIMIT 100</tt><tt></tt><p><tt>Oryou could use ROWCOUNT...</tt><tt></tt><p><tt>set rowcount = 10</tt><br /><tt>select * from table</tt><tt></tt><p><tt>Regards,</tt><tt></tt><p><tt>Mark.</tt><br/><tt>--</tt><br /><tt>Mark Jewiss</tt><br /><tt>KnowledgeMatters Limited--------------------------------------------------------------</tt></blockquote><tt></tt><p><br/><tt>I don't knownothing about ROWCOUNT.</tt><br /><tt>SET ROWCOUNT doesn't work for me.</tt><br /><tt>hygea=> set rowcount = 10;</tt><br/><tt>ERROR: parser: parse error at or near "10"</tt><tt></tt><p><tt>PostgreSQL still accepts SET QUERY_LIMITbut it doesn't work...</tt><tt></tt><p><tt>hygea=> set query_limit to '1';</tt><br /><tt>SET VARIABLE</tt><br/><tt>hygea=> select * from contatori;</tt><br /><tt>tipologia|tabella |contatore|contatorebis</tt><br/><tt>---------+---------------+---------+------------</tt><br /><tt>SOTTO |Modena | 1| 2</tt><br /><tt>SOPRA |prestazioni | 20|</tt><br /><tt>(2 rows)</tt><br/><tt>--------------------------------------------------------------</tt><br /><tt>PostgreSQL 6.5.0 on i586-pc-linux-gnu,compiled by gcc 2.7.2.3</tt><br />-----------------------------------------------------------------------------------<br />José
В списке pgsql-hackers по дате отправления: