468,257 Members | 1,497 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,257 developers. It's quick & easy.

FETCH FIRST ROW ONLY

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.

Apr 7 '06 #1
3 40009
nymano wrote:
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.

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Apr 7 '06 #2
Knut Stolze wrote:
nymano wrote:
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

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Apr 7 '06 #3
On Fri, 07 Apr 2006 07:22:52 -0700, nymano wrote:
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

--
Greetings from Troels Arvin, Copenhagen, Denmark

Apr 18 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by Evan Smith | last post: by
2 posts views Thread by deebeetwo | last post: by
13 posts views Thread by RR | last post: by
5 posts views Thread by Bernd Hohmann | last post: by
14 posts views Thread by sangram.0149 | last post: by
15 posts views Thread by dataguy | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by zattat | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.