从不同的表复制
insert into 表1 select * from 表2 where id =1
同一张表中复制(无主键)
insert into 表1 select * from 表2 where id =1
同一张表中复制(有主键)
insert into 表1(字段1,字段2,字段3) select 字段1,字段2,字段3 from 表1 where id=1
原文地址:http://blog.sina.com.cn/s/blog_4586764e0100de58.html
mohan87821000 博主文章分类:数据库-Mysql
文章标签 mysql用命令复制数据 文章分类 MySQL 数据库
从不同的表复制
insert into 表1 select * from 表2 where id =1
同一张表中复制(无主键)
insert into 表1 select * from 表2 where id =1
同一张表中复制(有主键)
insert into 表1(字段1,字段2,字段3) select 字段1,字段2,字段3 from 表1 where id=1
原文地址:http://blog.sina.com.cn/s/blog_4586764e0100de58.html
上一篇:RDS还原数据库时报错:ERROR 1227 (42000) at line 78664
下一篇:mysql:Access denied; you need (at least one of) the RELOAD privilege(s) for this operation
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M