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

fetch cursor

P: 3
plz tell the need of fetch
Sep 6 '07 #1
Share this Question
Share on Google+
2 Replies


P: 5
Hiya,

Cursors are used when more than one row from the table needs to be processed.
The Open cursor will get the filtered records from the table.
Fetch command will move the values from the table to the Host variables which can then be used in the host language program.

Declare Cursor (non executable statement)
Open Cursor (Get the records)
Fetch (Move values to Host Variables for one row at a time. the pointers to handle the next row is handled by Host Language)
It is only possible to fetch records in forward direction. you cannot go backward or to a previous record with cursors
Finally Close the cursor.

Regards,
Harish

plz tell the need of fetch
Sep 7 '07 #2

P: 3
Hi Harish,

Thanks,
sanlaan.
Sep 10 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.