当前位置:网站首页>To add a composite primary key
To add a composite primary key
2022-07-26 19:17:00 【Cruel and evil man!】
Steps to add a composite primary key
Composite primary key : There are multiple primary keys in a table

At this point, you need to add a new primary key , Compound primary keys can only be added at the same time , Create at the same time , Adding directly will report an error
# Delete all primary keys
ALTER TABLE Table name DROP PRIMARY KEY:
# Add new primary key field
ALTER TABLE Table name ADD
Field name VARCHAR (1) COMMENT ' remarks xxx' NOT NULI DEFAULT
# Add primary key
ALTER TABLE Table name ADD PRIMARY KEY(
` Field name 1`,
` Field name 2`,
` Field name 3`,
` Field name 4`
)
Add to complete !
边栏推荐
- This article explains in detail the five benefits that MES system brings to enterprises, with application scenarios
- 基础模块及算例#pytorch学习
- 2022 welder (elementary) operation certificate examination question bank and simulation examination
- ReentrantLock学习之---释放锁过程
- 手写一个Starter
- 2022g1 industrial boiler stoker certificate question bank and simulation examination
- 最后一篇博客
- 2022年流动式起重机司机考试试题模拟考试平台操作
- Write a starter
- The diagram of user login verification process is well written!
猜你喜欢

The first letter of leetcode simple question appears twice

MySQL日志介绍

Introduce the difference between @getmapping and @postmapping in detail

Operations research 69 | explanation of classic examples of dynamic planning

MapReduce(二)

Article 7:exited on desktop-dff5kik with error code -1073741511

How to solve the problem that win11 has been switched on after upgrading

Reentrantlock learning --- basic method

Vs2019 export import configuration

销量下滑,品牌边缘化,失去“安全牌”的沃尔沃,还能走多远?
随机推荐
Simulated 100 questions and simulated examination of refrigeration and air conditioning equipment operation examination in 2022
The diagram of user login verification process is well written!
分布式事务-seata
Leetcode notes: biweekly contest 83
[server data recovery] data recovery case of server storage shared folder loss
2022G1工业锅炉司炉上岗证题库及模拟考试
LeetCode简单题之第一个出现两次的字母
[interview question] 1384- share 44 JS problems. Half right is a master
Model definition pytorch learning
时空预测5-GAT
Article 7:exited on desktop-dff5kik with error code -1073741511
(ICLR-2022)TADA! Time adaptive convolution for video understanding
.Net CLR GC 动态加载短暂堆阈值的计算及阈值超量的计算
The inventory of chips in the United States is high, and the shipment of chips in China has increased rapidly and the import of 28.3 billion chips has been greatly reduced. TSMC has a showdown
Tensorflow GPU 1.15 installation
MySQL数据库命令大全
密码一致,总显示如下图
JS使用readline来实现终端输入数据
从6月25日考试之后,看新考纲如何复习PMP
Sentinel isolation and degradation