网络营销电子商务研究中心

网络营销电子商务研究中心 (https://www.0058.net/index.php)
-   MySQL (https://www.0058.net/forumdisplay.php?f=76)
-   -   Mysql 复制一条数据 (https://www.0058.net/showthread.php?t=5802)

Racine 2016-07-18 11:33 AM

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


All times are GMT +8. The time now is 10:54 AM.

Powered by vBulletin Version 3.8.7
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.