How can u Fetch first row Only ?



IBM's flagship relational database management system

How can u Fetch first row Only ?

Postby ragur.satheesh » Mon Dec 13, 2010 12:18 pm

How can u Fetch first row Only ?
ragur.satheesh
 
Posts: 17
Joined: Thu Jul 22, 2010 12:34 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How can u Fetch first row Only ?

Postby GuyC » Mon Dec 13, 2010 2:14 pm

by coding fetch first rows only
GuyC
 
Posts: 315
Joined: Tue Aug 11, 2009 3:23 pm
Has thanked: 1 time
Been thanked: 4 times

Re: How can u Fetch first row Only ?

Postby Selvaraj » Thu Dec 23, 2010 2:06 pm

Use FOR FETCH ONLY
Selvaraj
 
Posts: 9
Joined: Wed Dec 22, 2010 9:09 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How can u Fetch first row Only ?

Postby GuyC » Thu Dec 23, 2010 2:23 pm

Selvaraj wrote:Use FOR FETCH ONLY

Nope, that's not it.
GuyC
 
Posts: 315
Joined: Tue Aug 11, 2009 3:23 pm
Has thanked: 1 time
Been thanked: 4 times

Re: How can u Fetch first row Only ?

Postby dick scherrer » Fri Dec 24, 2010 1:27 am

Hello,

Use FOR FETCH ONLY
You should only post suggestions that you have actually tested. . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: How can u Fetch first row Only ?

Postby chandrababun » Wed Dec 29, 2010 3:54 pm

First row Fetch from employee table : Query is --> SELECT * FROM EMPLOYEE FETCH FIRST ROW ONLY
First 10 rows Fetch from employee table: Query is --> SELECT * FROM EMPLOYEE FETCH FIRST 10 ROWS ONLY
chandrababun
 
Posts: 3
Joined: Wed Oct 20, 2010 2:36 pm
Has thanked: 0 time
Been thanked: 0 time


Return to DB2

 


  • Related topics
    Replies
    Views
    Last post