View previous topic :: View next topic
|
Author |
Message |
maheshurstd
New User
Joined: 16 Feb 2006 Posts: 14
|
|
|
|
Hi,
How to read only the last record without having a record key values using SQL? &
How to read only the First record without having a record key values?
If any one has the code please send it
Thanks in advance
Regards
Mahesh |
|
Back to top |
|
|
Prajesh_v_p
Active User
Joined: 24 May 2006 Posts: 133 Location: India
|
|
|
|
I am not sure what exactly u need..
If u want to select only first row from a set of rows retrived..u can very well give FETCH FIRST ROW ONLY statement in DB2 like
select * from table
FETCH FIRST ROW ONLY ;
To get the last row may be, u can use an order by clause to reverse order the row retrival and try a fetch first row..
Please correct me if I am wrong.. |
|
Back to top |
|
|
|