Pavel Stehule escribió:
> Hello
>
> I found one usefull article
> http://iablog.sybase.com/paulley/2008/07/sql2008-now-an-approved-iso-international-standard/
Wow, this is really horrid:
# F856 through F859: FETCH FIRST clause in subqueries, views,and query expressions. The SQL:2008 syntax for
restrictingtherows of a result set is FETCH FIRST, rather than Microsoft SQLServer’s SELECT TOP N equivalent which SQL
Anywheresupportspresently.
This means we have to support stuff like
declare foo cursor for select * from lists;
select * from (fetch first from foo) as bar;
(I wonder why didn't they use FETCH NEXT instead. As is, it seems a bit
cumbersome to use.)
--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support