当前位置:网站首页>Thoughts on joint primary key
Thoughts on joint primary key
2022-06-22 17:12:00 【Seven days at night】
Yesterday, colleagues conducted service joint commissioning in the test environment , Suddenly, the maintenance information interface reports
Duplicate entry 'a-b-c' for key 'PRIMA
The first reaction is the problem of duplicate primary keys , A closer look at the table reveals , The union primary key used by this table (a,b,c), Let's look at the implementation SQL, Find out where After the condition a='xxx' and b='xxx', Immediately react , The unique identification of the data is a-b-c Determined by three field data , If use a-b To judge , Multiple pieces of data will be updated , And the final result is that multiple pieces of data become a-b-1 This situation , It definitely violates uniqueness .
resolvent :
stay where a='xxx' and b='xxx' increase and c='xxx', Then execute the statement , Successfully solve the problem . Of course, there are careful questions , However, it also shows that colleagues do not fully understand the concept of joint primary key .
边栏推荐
- MTLs guidelines for kubernetes engineers
- Quickly master asp Net authentication framework identity - user registration
- Short video source code development, high-quality short video source code need to do what?
- 来厦门了!线上交流限额免费报名中
- 关于#数据库#的问题,如何解决?
- What is a flush? Is online account opening safe?
- 170million passwords of Netcom learning link have been leaked! What are the remedies?
- 调用cmd 进程通信
- The MySQL of docker restarts, prompting error response from daemon: driver failed programming external connectivity on**
- Figure operation flow of HAMA BSP Model
猜你喜欢

MySQL master-slave connection prompt of docker: communications link failure

0基础如何入门软件测试,能转行成功吗?

【阿里云服务器-安装mysql的5.6版本安装,重装】

Short video source code development, high-quality short video source code need to do what?
![[step 1 of advanced automated testing] 1 minute to introduce you to automated testing](/img/00/9647d552749092954a91bd84307773.png)
[step 1 of advanced automated testing] 1 minute to introduce you to automated testing

社会担当 广汽本田“梦想童行”倡导儿童道路交通安全

WPF效果第一百九十篇之再耍ListBox

快速掌握 ASP.NET 身份认证框架 Identity - 用户注册

LETV group payment system architecture sharing for processing 100000 high concurrent orders per second

【进阶自动化测试第一步】1分钟带你了解自动化测试
随机推荐
spark-shuffle的读数据源码分析
mysql5.7.27安装之windows8.1 64
你管这破玩意儿叫高可用?
Apache ShardingSphere 一文读懂
spark关于数据倾斜问题
Xftp 7(FTP/SFTP客户端) V7.0.0107 官方中文免费正式版(附文件+安装教程)
On the closure function of Scala
可能是全网最全的Matplotlib可视化教程
Windows8.1 64 installed by mysql5.7.27
be based on. NETCORE development blog project starblog - (12) razor page dynamic compilation
【进阶自动化测试第一步】1分钟带你了解自动化测试
调用cmd 进程通信
Vhedt business development framework
【阿里云服务器-安装mysql的5.6版本安装,重装】
spark与mysql:Did not find registered driver with class com.mysql.jdbc.Driver
Description of new features and changes in ABP Framework version 5.3.0
A classmate asked what framework PHP should learn?
Social responsibility: GAC Honda advocates children's road traffic safety in "dream children's travel"
图计算Hama-BSP模型的运行流程
Spark and mysql:did not find registered driver with class com mysql. jdbc. Driver