当前位置:网站首页>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 !
边栏推荐
- The class jointly built by famous oarsmen is new, and Professor qiuxipeng of Fudan University broadcast it live on Tuesday!
- How far can Volvo, which has lost its "safety brand" due to declining sales and marginalization of its brand?
- ReentrantLock学习之---基础方法
- The diagram of user login verification process is well written!
- 2022 mobile crane driver test questions simulation test platform operation
- 中信建投启牛会员优惠开户安全吗,不知道是不是最低的佣金
- [MySQL from introduction to proficiency] [advanced chapter] (VIII) clustered index & non clustered index & joint index
- 第九章 实用建模技术
- 2022上海市安全员C证操作证考试题库模拟考试平台操作
- JS map usage
猜你喜欢
![[MySQL from introduction to proficiency] [advanced chapter] (VIII) clustered index & non clustered index & joint index](/img/18/1644301d575fad0a0d0f15932487d0.png)
[MySQL from introduction to proficiency] [advanced chapter] (VIII) clustered index & non clustered index & joint index

Gongfu developer community is settled! On July 30!

基础模块及算例#pytorch学习

Leetcode simple question: the minimum total time required to fill a cup

ReentrantLock学习之公平锁过程

J1:Redis为什么这么快+基本结构
![[postgraduate entrance examination vocabulary training camp] day 13 - reliance, expert, subject, unconscious, photograph, exaggeration, counter act](/img/9c/0e6e8abebfd3afdeef2913281a6ada.png)
[postgraduate entrance examination vocabulary training camp] day 13 - reliance, expert, subject, unconscious, photograph, exaggeration, counter act

PMP practice once a day | don't get lost in the exam -7.26 (including agility + multiple choices)

MySQL - function and constraint commands

2022 chemical automation control instrument test question simulation test platform operation
随机推荐
Vs2019 export import configuration
JS map usage
LeetCode简单题之第一个出现两次的字母
指标和标签是做什么的
MongoDB stats统计集合占用空间大小
.Net CLR GC 动态加载短暂堆阈值的计算及阈值超量的计算
Model definition pytorch learning
机器学习笔记 - 构建推荐系统(6) 用于协同过滤的 6 种自动编码器
2022 tea master (intermediate) examination question simulation examination question bank and answers
.net CLR GC dynamic loading transient heap threshold calculation and threshold excess calculation
Gongfu developer community is settled! On July 30!
LeetCode简单题之验证回文字符串 Ⅱ
多线程学习笔记-1.CAS
模型定义#pytorch学习
OpenSSF 基金会总经理 Brian Behlendorf :预计 2026 年将有 4.2 亿个开源
Is it safe to apply for public REITs account by mobile phone?
Synchronized理论
ReentrantLock学习之---释放锁过程
(ICLR-2022)TADA! Time adaptive convolution for video understanding
Racher deploys kubernetes cluster