当前位置:网站首页>MySQL stored procedure realizes the creation of a table (copy the structure of the original table and create a new table)
MySQL stored procedure realizes the creation of a table (copy the structure of the original table and create a new table)
2022-07-29 01:01:00 【Live healthy and safe】
One Stored procedure code
1.1 stored procedure
drop PROCEDURE if EXISTS p_create_table4;
CREATE DEFINER=`root`@`%` PROCEDURE `p_create_table4`(
IN pa_table_name VARCHAR (30) # Table name
)
BEGIN
# utilize concat Splice string function , The... Of the table will be copied sql Assign to variable sql_create_table
set @sql_create_table = concat('CREATE TABLE ',pa_table_name,' like ','iip_acc_warn_information');
# Pretreatment table building
PREPARE sql_create_table FROM @sql_create_table;
# perform sql
EXECUTE sql_create_table;
END1.2 Call the process
call p_create_table4("iip_acc_warn_information_8910");
1.3 See the effect


边栏推荐
- 状态压缩dp-蒙德里安的梦想
- Have you seen the management area decoupling architecture? Can help customers solve big problems
- [web development] basic knowledge of flask framework
- 【commons-lang3专题】005- ObjectUtils 专题
- Self made | a 16 bit RISC architecture CPU is self-made by hand
- “index [hotel/jXLK5MTYTU-jO9WzJNob4w] already exists“
- Data warehouse construction - DWT floor
- selenium对接代理与seleniumwire访问开发者工具NetWork
- DRF - web development mode, API interface, API interface testing tool, restful specification, serialization and deserialization, DRF installation and use
- B-tree~
猜你喜欢

What are the methods to track the real-time market of London Silver?
![“index [hotel/jXLK5MTYTU-jO9WzJNob4w] already exists“](/img/f2/37a1e65eb1104d72128f96fc5d9c85.png)
“index [hotel/jXLK5MTYTU-jO9WzJNob4w] already exists“
![[raspberry pie] how does the windows computer connect with raspberry pie](/img/d6/42685bbc4e4af757867442b63ce9c8.png)
[raspberry pie] how does the windows computer connect with raspberry pie

How to create a custom 404 error page in WordPress

深度学习 | MATLAB实现TCN时间卷积神经网络spatialDropoutLayer参数描述
![Error reporting: the network preview shows {xxx:['this field is required']}](/img/96/b0a6c01543fcbcc6d3262b3797fae2.jpg)
Error reporting: the network preview shows {xxx:['this field is required']}

Tips for API interface optimization
![[target detection] Introduction to yolor theory + practical test visdrone data set](/img/cd/3cb13d6d79cd207c6d637af7756ffc.png)
[target detection] Introduction to yolor theory + practical test visdrone data set

AQS原理

小程序毕设作品之微信校园浴室预约小程序毕业设计成品(6)开题答辩PPT
随机推荐
Wechat campus bathroom reservation of small program completion work (6) opening defense ppt
Summary of preprocessing methods for time series data
DRF - paging, JWT introduction and principle, JWT quick use, JWT source code analysis, JWT custom return format, custom user issued token, custom token authentication class
如何执行建设项目的时间影响分析?
如何处理项目中的时间、范围和成本限制?
[web development] basic knowledge of flask framework
管理区解耦架构见过吗?能帮客户搞定大难题的
电子招标初学者指南
双链表的定义 ~
新一代超安全蜂窝电池,思皓爱跑上市,13.99万起售
armeabi-v7a架构(sv7a)
The method of tracking the real-time market of London Silver
Cookie和Session
【commons-lang3专题】002- RandomUtils 专题
Huawei releases harmonyos 3.0, taking another step towards "Internet of all things"
day8
🧐 table1 | 一秒搞定你的三线表
[Commons lang3 topic] 002 randomutils topic
Asynchronous mode worker thread
Yield Guild Games:这一年的总结与未来展望