存储过程执行拼接的sql

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u010924288/article/details/53839951
delimiter //
drop procedure if exists looppc;
 create procedure looppc()
 begin  

declare i int;


declare m1 varchar(1000);


SET @m1 = "SELECT	* FROM `zjxx_exampeople` WHERE 1=1 ";
		
		prepare stmt from @m1;  
		EXECUTE stmt;  
		deallocate prepare stmt;
 END; // 

CALL looppc()

展开阅读全文

没有更多推荐了,返回首页