当前位置:网站首页>Modify table structure
Modify table structure
2022-07-03 01:51:00 【Xu Feng &】
1, Basics
alter table table_name Modify clause
// It is allowed to specify multiple actions , Comma off
2, Modify clause
newly added
add column_name data_type [not null][default default_value]
// Primary key
add primary key
drop primary key
change
change column_name new_column data_type
[not null][default default_name]
to update
modify column_name new_data_type[not null][default default_value]
// Directly change without entering the old name, directly enter the new name
Delete field
drop column column_name
Delete unique constraint
drop column column_name
rename table
rename table table_name to new_table_name
边栏推荐
- Certaines fonctionnalités du développement d'applets
- In 2022, 95% of the three most common misunderstandings in software testing were recruited. Are you that 5%?
- Telecom Customer Churn Prediction challenge
- "Jetpack - livedata parsing"
- Niuniu's ball guessing game (dynamic planning + prefix influence)
- [error record] navigator operation requested with a context that does not include a naviga
- 网络安全-扫描与密码爆破2
- Leetcode skimming questions_ Sum of two numbers II - enter an ordered array
- [understanding of opportunity -36]: Guiguzi - flying clamp chapter - prevention against killing and bait
- [untitled]
猜你喜欢
Summary of interval knowledge
网络安全-漏洞与木马
技术大佬准备就绪,话题C位由你决定
How is the mask effect achieved in the LPL ban/pick selection stage?
Sweet talk generator, regular greeting email machine... Open source programmers pay too much for this Valentine's day
Smart management of Green Cities: Digital twin underground integrated pipe gallery platform
PS remove watermark details
PS去除水印详解
Why is it not recommended to use BeanUtils in production?
Installation and use of serial port packet capturing / cutting tool
随机推荐
[data mining] task 6: DBSCAN clustering
High-Resolution Network (篇一):原理刨析
String splicing function of MySQL
STM32 - introduction of external interrupts exti and NVIC
深度(穿透)选择器 ::v-deep/deep/及 > > >
Related concepts of GDB in embedded system
[data mining] task 2: mimic-iii data processing of medical database
[camera special topic] Hal layer - brief analysis of addchannel and startchannel
Types of map key and object key
网络安全-破解系统密码
Cloud native topic sorting (to be updated)
Network security ACL access control list
自定义组件、使用npm包、全局数据共享、分包
[shutter] animation animation (animatedwidget animation use process | create animation controller | create animation | create animatedwidget animation component | animation operation)
STM32 - Application of external interrupt induction lamp
网络安全-木马
The technology boss is ready, and the topic of position C is up to you
When the epidemic comes, how to manage the team as a leader| Community essay solicitation
Vant implements a simple login registration module and a personal user center
Everything file search tool