Skip navigation links

MySQL Forums :: Oracle :: Cursor and Prepared statement


Advanced Search

Re: Cursor and Prepared statement
Posted by: Carol Nickel ()
Date: July 21, 2008 06:21PM

Unfortunately, it looks like prepare statements can't be used in cursors. From the manual: http://dev.mysql.com/doc/refman/6.0/en/sql-syntax-prepared-statements.html

"SQL syntax for prepared statements can be used within stored procedures, but not in stored functions or triggers. However, a cursor cannot be used for a dynamic statement that is prepared and executed with PREPARE and EXECUTE. The statement for a cursor is checked at cursor creation time, so the statement cannot be dynamic."

I would also be interested to know what the alternative is.

Options: ReplyQuote


Subject Views Written By Posted
Cursor and Prepared statement 16434 Rajarshi Biswas 09/19/2006 02:32AM
Re: Cursor and Prepared statement 7611 Marius Snyman 06/02/2008 03:56AM
Re: Cursor and Prepared statement 8300 Carol Nickel 07/21/2008 06:21PM
Re: Cursor and Prepared statement 10187 Carol Nickel 09/10/2008 05:27PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.