Error Code: 1068. Multiple primary key defined
1、错误描述
10:10:38 alter table user add num int(8) primary key first Error Code: 1068. Multiple primary key defined 0.000 sec
2、错误原因
这个错误的原因是定义了两个主键,导致出错
3、解决办法
alter table user add num int(8) primary key first;
去掉“primary key”
Error Code: 1068. Multiple primary key defined的更多相关文章
- mysql:[Err] 1068 - Multiple primary key defined
添加主键时,出现错误:[Err] 1068 - Multiple primary key defined #增加主键 ) not null; ; alter table my_test add pri ...
- Discuz升级 Database Error : pre_common_syscache ADD PRIMARY KEY (cname)【解决办法】
错误码: 1068Multiple primary key defined Execution Time : 00:00:00:000Transfer Time : 00:00:00:000Total ...
- MySQL Error Code文档手册---摘自MySQL官方网站
This chapter lists the errors that may appear when you call MySQL from any host language. The first ...
- EF code first,set composite primary key 复合key问题
环境: EF core 2.0 Net core 2.0 错误: 因实体定义了多个key,打开数据库时程序报以下错误 An unhandled exception occurred while pro ...
- MySQL主从复制中断,报“Error on master: message (format)='Cannot delete or update a parent row: a foreign key constraint fails' error code=1217” 错误
前几天,发现从库挂了,具体报错信息如下: 分析思路 1. 因为我采用的是选择性复制,只针对以下几个库进行复制: card,upay,deal,monitor,collect.所以,不太可能出现对于sa ...
- Error Code: 1452 Cannot add or update a child row: a foreign key constraint fails
错误: Error Code: 1452 Cannot add or update a child row: a foreign key constraint fails 错误产生情景:我向一张带外键 ...
- Error Code: 1175.You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column.
在MySQL Workbench里面使用SQL语句: delete from 表名 提示出错: Error Code: 1175.You are using safe update mode and ...
- mysql主从复制错误:Last_SQL_Error: Error 'Duplicate entry '327' for key 'PRIMARY'' on query. Default database: 'xxx'. Query: 'insert into
这个算不算解决,我都不太清楚,因为我感觉网上的说法,只是把错误忽略了,不表示以后用从库时不会出问题!!! 解决的办法是在从库上执行: mysql> slave stop; mysql> s ...
- Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column To disable safe mode, toggle the option in Preferences -> SQL Queries and reconn
使用MySQL执行update的时候报错: MySQL 在使用mysql执行update的时候,如果不是用主键当where语句,会报如下错误,使用主键用于where语句中正常. 异常内容: ...
随机推荐
- 安装linux下面用来配置网络,防火墙,系统服务等设置的图形小工具Setup
Setup命令是linux下面用来配置网络,防火墙,系统服务等设置的图形小工具.使用起来非常方便简单,可是centos\redhat最小化安装之后发现setup命令工具用不了. 接下来介绍如何安装se ...
- ffmpeg命令行循环推流
用ffmpeg循环推一个文件到rtmp服务器.一般都是建议用-stream_loop选项.如: ffmpeg -threads -re -fflags +genpts -stream_loop - - ...
- xBIM 应用与学习 (二)
目录 xBIM 应用与学习 (一) xBIM 应用与学习 (二) xBIM 基本的模型操作 xBIM 日志操作 XBIM 3D 墙壁案例 xBIM 格式之间转换 xBIM 使用Linq 来优化查询 x ...
- java中队列Queue的使用
1.在java5中新增加了java.util.Queue接口,用以支持队列的常见操作.Queue接口与List.Set同一级别,都是继承了Collection接口.Queue使用时要尽量避免Colle ...
- ZOJ 2314 Reactor Cooling [无源汇上下界网络流]
贴个板子 #include <iostream> #include <cstdio> #include <cstring> #include <algorit ...
- BZOJ 2467: [中山市选2010]生成树 [组合计数]
2467: [中山市选2010]生成树 Time Limit: 5 Sec Memory Limit: 128 MBSubmit: 638 Solved: 453[Submit][Status][ ...
- Python tutorial阅读之使用 Python 解释器
配置环境变量后,一般可以直接通过Python或指定Python版本号来调用Python. Python 解释器有些操作类似 Unix shell:当使用终端设备(tty)作为标准输入调用时,它交互的解 ...
- 使用Spring Boot搭建应用开发框架(一) —— 基础架构
Spring的简史 第一阶段:XML配置,在Spring1.x时代,使用Spring开发满眼都是xml配置的Bean,随着项目的扩大,我们需要把xml配置文件分放到不同的配置文件里,那时候需要频繁的在 ...
- Rsync(远程同步): linux中Rsync命令的实际示例
rsync的 ( 远程同步 )为在Linux / Unix系统局部 拷贝和同步文件和目录远程以及一个最常用的命令. 随着rsync命令的帮助,您可以复制并在目录中远程和本地同步数据,在磁盘和网络,进行 ...
- Invoke 与 BeginInvoke 应用场景
1.委托中 Invoke , BeginInvoke 特点 Invoke : 同步调用 , 委托在当前线程执行 BeginInvoke : 异步调用 , 通常使用线程池资源执行委托. 2. UI ...