In sybase, using a cursor can one delete the currently referenced row? If so what does the cursor end up referencing?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
From manuals.sybase.com – Updating and deleting rows using cursors:
Using the where current of clause of the delete statement, you can delete the row at the current cursor position. When you delete a row from the cursor’s result set, the row is deleted from the underlying database table. You can delete only one row at a time using the cursor.
After you delete a row from a cursor, Adaptive Server positions the cursor before the row following the deleted row in the cursor result set. You must still use fetch to access that next row. If the deleted row is the last row in the cursor result set, Adaptive Server positions the cursor after the last row of the result set.