MySQL Forums
Forum List  »  Stored Procedures

Re: Passing value beteen declared variables within cursor loop
Posted by: Michael Ayres
Date: March 16, 2016 12:14PM

Figured out my own question, I think:

To manipulate variables declared within a stored procedure that are used as receivers of values FETCHED within a control loop in the procedure,

myvar1 = myvar2 does not work, but
SET myvar1 = myvar2.

Thus, even though user declared variables are 'variables', forgetting FETCH, they can only be changed/updated as being treated like a data field using the SET x = 7, rather than a programming act like x = 7.

Interesting, looks like the database type override a programming language assignment operator. I think Oracle PL/SQL has more of a programming language that is not bounded by DB structures... I think.

Michael Ayres
Senior Technical Project Manager
Cyber Security Coordination Center

Michael Ayres, MS, PMP, ACP, CISSP
University of California Office of the President (contractor)
1111 Franklin Street #7109 Oakland, Ca.94607 | (510) 987-9459 | (415) 999-2049 Mobile

Options: ReplyQuote

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.