注册 登录
编程论坛 SQL Server论坛

phpmyadmin导入数据库出现错误

lwtop124 发布于 2016-10-27 09:23, 1674 次点击
错误

SQL 查询:

--
 -- 转存表中的数据 `wp_comments`
 --
  INSERT INTO `wp_comments` ( `comment_ID` , `comment_post_ID` , `comment_author` , `comment_author_email` , `comment_author_url` , `comment_author_IP` , `comment_date` , `comment_date_gmt` , `comment_content` , `comment_karma` , `comment_approved` , `comment_agent` , `comment_type` , `comment_parent` , `user_id` )
 VALUES ( 1, 1, 'A WordPress Commenter', 'wapuu@wordpress.example', 'https://', '', '2016-10-17 01:14:51', '2016-10-17 01:14:51', 'Hi, this is a comment.\nTo get started with moderating, editing, and deleting comments, please visit the Comments screen in the dashboard.\nCommenter avatars come from <a href="https://', 0, 'post-trashed', '', '', 0, 0 ) ;

  

 MySQL 返回: 文档
 #1062 - Duplicate entry '1' for key 'PRIMARY'
请问怎么解决
2 回复
#2
梦幻倩影2016-10-28 09:09
数据库中主键ID重复了
#3
梦幻倩影2016-10-28 09:11
解决办法要么删除原来的老数据,要么修改插入的主键
1