MySQL版本5.0.13以上
create table aa (id int);
delimiter //
create procedure test(v_sql varchar(200))
begin
set @sqltext:=concat('insert into aa ',v_sql);
prepare stmt from @sqltext;
execute stmt;
DEALLOCATE PREPARE stmt;
end;
//
call test('values (1)')//
[@more@]