drop procedure if exists test; delimiter $$ create procedure test () begin declare table_conflicts int default 0; set @sql = concat('select count(*) into table_conflicts from user where id = 1;'); prepare stmt from @sql; execute stmt; end; $$ delimiter ; CALL test();
|Undeclared variable using SELECT ... INTO in dynamic SQL||4843||Carsten Klotz||08/29/2011 08:41AM|
|Re: Undeclared variable using SELECT ... INTO in dynamic SQL||1601||Peter Brawley||08/30/2011 08:02AM|
|Re: Undeclared variable using SELECT ... INTO in dynamic SQL||1302||Carsten Klotz||09/14/2011 02:29AM|
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.