MySQL存储过程 prepare

参考文章:
https://maoyifa100.iteye.com/blog/1900305
https://www.aliyun.com/jiaocheng/1140825.html

SET @xx="name,bm"; 
SET @sql1 = CONCAT('select ',@xx,' from people');
prepare s1 from @sql1;
execute s1;
deallocate prepare s1;```

猜你喜欢

转载自blog.csdn.net/qq_30923243/article/details/86573625