Comments - INSERT...RETURNING

3 years ago Ashford Nichols

Is there a specific limitation regarding setting local variables with the returned value? I'm able to set session variables using the following:

INSERT INTO tbl1 (col1, col2) VALUES (1, 2) RETURNING @ses_var = col3;

but I'm not able to do the following:

INSERT INTO tbl1 (col1, col2) VALUES (1, 2) RETURNING SET loc_var = col3;

 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.