当前位置:网站首页>mysql复制表
mysql复制表
2022-07-17 00:28:00 【xiejunna】
本想用Create table Table2 (Select * from Table1);
这个语句,但结果发现,数据拷贝的没问题,但表结构中的primary key,Extra,auto_increment等属性没有了,只有放弃这种方法。
使用这个方法:
//显示建表语句,复制建表语句,修改表名为新表的表名,创建表
SHOW CREATE TABLE `ori_table`;
//把原表的数据拷贝到新表来
INSERT INTO `new_table` SELECT * FROM `ori_table`;
边栏推荐
- Go语言 实现发送短信验证码 并登录
- Oracle gets the last and first data (gets the first and last data by time)
- Elk log analysis system
- Binary installation kubernetes 1.24.1
- 多项式插值拟合(二)
- Introduction to wangeditor (entry level)
- Upgrade kubernetes 1.23.2 to 1.24.1
- [MCU simulation] (V) addressing mode - immediate addressing and register indirect addressing
- Tools and methods - Excel plug-in xltools
- ELK日志分析系统
猜你喜欢
Changes of service account in kubernetes1.24
Tools and methods - Excel plug-in xltools
Redis之简单动态字符串SDS
C language foundation day4 array
【PHP】tp6多表连接查询
Mysql优化之索引
Letv a plus de 400 employés? Le jour de l'immortel sans patron, les autorités ont répondu...
yolov5 opencv DNN 推理
RHCE Study Guide Chapter 5 VIM editor
Understand JVM garbage collection in one article
随机推荐
[MCU simulation] (I) proteus8.9 installation tutorial
Fiddler抓包
Learning network foundation
【单片机仿真】(十)指令系统 — 算术运算指令 之 乘法指令、除法
2. Actual use of asynctool framework
HCIA static comprehensive experiment
Nat comprehensive experiment
Binary installation kubernetes 1.24.1
多项式插值拟合(一)
Binary installation kubernetes 1.23.2
[single chip microcomputer simulation] (10) instruction system - multiplication instruction and division of arithmetic operation instruction
【MySQL】数据查询操作(select语句)
Fiddler grabbing
[regression prediction] lithium ion battery life prediction based on particle filter with matlab code
ncnn 部分算子不支持的替换操作
你能用到的Mysql常用命令
MySQL日志管理和完全备份增量备份与恢复
【NoSQL】NoSQL之redis配置与优化(简单操作)
Elk log analysis system
TCP three handshakes and four disconnects