Hi.
Just a brief question: Are "FETCH FIRST ROW ONLY" and "FETCH FIRST x
ROWS ONLY" DB2 specific or SQL92?
thanks for any help,
nymano.
> Hi.
>
> Just a brief question: Are "FETCH FIRST ROW ONLY" and "FETCH FIRST x
> ROWS ONLY" DB2 specific or SQL92?
Definitively not SQL92. And I could find it neither in SQL:2003 or SQL:200x
(which will be the next version of the standard, hopefully in 2007).
Btw, nobody cares about the SQL92 standard any longer. SQL:2003 is the
current one.

Signature
Knut Stolze
DB2 Information Integration Development
IBM Germany
Serge Rielau - 07 Apr 2006 23:33 GMT
>> Hi.
>>
>> Just a brief question: Are "FETCH FIRST ROW ONLY" and "FETCH FIRST x
>> ROWS ONLY" DB2 specific or SQL92?
Submissions for the next round of the standards are on and IBM is moving
to standardize a clause. Politics typically dictate that no vendor's
existing syntax ever gets through unchanged, but syntax is easily
modified. :-)
My money is on something like mySQL's OFFSET x LIMIT y.
Cheers
Serge

Signature
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
> Just a brief question: Are "FETCH FIRST ROW ONLY" and "FETCH FIRST x
> ROWS ONLY" DB2 specific or SQL92?
"FETCH FIRST ..." is DB2's proprietary way to limit result sets.
DB2 offers SQL:2003's way, also. In fact now that MS has released MSSQL
2005, it seems that all of the "Big 3" support SQL:2003's "window
function" approach, see http://troels.arvin.dk/db/rdbms/#select-limit

Signature
Greetings from Troels Arvin, Copenhagen, Denmark