Home >Backend Development >PHP Tutorial > mysql 蠕虫复制疏失

mysql 蠕虫复制疏失

WBOY
WBOYOriginal
2016-06-13 12:41:07889browse

mysql 蠕虫复制出错
版本:mysql 5.5
我有一张wish表是这样的:
+----+------+----------------------+
| id | name | wish                 |
+----+------+----------------------+
|  1 | 张飞    | 好久没有见到大哥了!
+----+------+----------------------+

我想复制表中的第一条记录,
insert into wish select * from wish;
或者 
insert into wish select name,wish from wish;
或者
insert into wish
(name,wish)
values
select * from wish;

以上均报错,主要是报ERROR 1062 (23000): Duplicate entry '1' for key 'PRIMARY'

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn