Characteristics of Cursor MYSQL

0
Your rating: None

Here is a brief characteristics of cursor in MYSQL
READ ONLY
NOT SCROLLABLE
ASENSITIVE

In version five of MySQL, you can only fetch from cursors, you cannot update them. That is,cursors are READ ONLY. You cannot have:

FETCH cursor1 INTO variable1;
UPDATE t1 SET column1 = 'value1' WHERE CURRENT OF cursor1;

Cursors are also NOT SCROLLABLE. That is, you can only fetch the next row, you cannot move back and forth in the result set. You cannot have:

FETCH PRIOR cursor1 INTO variable1;
FETCH ABSOLUTE 55 cursor1 INTO variable1;

And you should avoid doing updates on a table while you have a cursor open on the same table, because cursors are ASENSITIVE.

That is, if you don't avoid doing updates, there is no guarantee
what the results will be. I know that they can be different if you use the InnoDB storage engine instead of the MyISAM storage engine.

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Copy the characters (respecting upper/lower case) from the image.

Cumulus Tag Cloud

Kiran Says

I love work environment which is:

Informal yet professional
Demanding yet rewarding
Challenging yet inspiring
Mediocrity is not an option
Having fun is serious business
Making mistakes is human
Forgiveness is Company Policy

Travelling Sucks