标签: mysql
我使用连接函数在存储过程中运行子查询。该查询应该返回一个数字但返回NULL。感谢您的帮助。
set @Sl =Concat('select sum(etl_insert_rows) into @Times from Table1 where etl_job_id in (SELECT etl_job_id FROM Table2 where etl_target_table="',@TabName,'")'); Prepare stmt from @Sl; Execute stmt;