By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,756 Members | 1,757 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,756 IT Pros & Developers. It's quick & easy.

FETCH FIRST ROW ONLY

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
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

P: n/a
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.