mysql 蠕虫复制疏失

WBOY
Release: 2016-06-13 12:41:07
Original
852 people have browsed it

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'

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template