当前位置:网站首页>Summary of alter operation in SQL
Summary of alter operation in SQL
2022-06-26 18:14:00 【yanruo06280】
alter Usage Summary
1、 Add column
alter table Table name add column Name type ‘ describe ’
2、 Delete column
alter table Table name drop column Column name to delete
3、 Modify column type 、 length
ALTER TABLE Table name CHANGE COLUMN Name New column names new property
or
alter table Table name modify column Name attribute (col-type);
4、 To be ranked high
ALTER TABLE Table name CHANGE COLUMN Name New column names attribute
5、 rename table
ALTER TABLE Table name RENAME TO Table new name
6、 Delete the primary key in the table
Alter TABLE Table name DROP primary key
7、 Add primary key
ALTER TABLE Table name ADD CONSTRAINT Constraint name PRIMARY KEY ( Add columns )
8、 Add index
ALTER TABLE Table name ADD index Index name ( Name );
9、 Modify column properties
ALTER TABLE Table name MODIFY COLUMN The column name of the attribute to modify new property ;
reference :
https://blog.csdn.net/qq_41820897/article/details/100179834
边栏推荐
- JVM entry door (1)
- Eigen库计算两个向量夹角
- [QNX] Command
- Detailed explanation of MySQL mvcc mechanism
- ZCMU--1367: Data Structure
- 判断某个序列是否为栈的弹出序列
- Concept and working principle of data encryption standard (DES)
- Leetcode 238 product of arrays other than itself
- Clion compiling catkin_ WS (short for ROS workspace package) loads cmakelists Txt problems
- 临时关闭MySQL缓存
猜你喜欢

Binary search-1

Row lock analysis and deadlock

next(iter(dataloader))的一点点体会

Clion compiling catkin_ WS (short for ROS workspace package) loads cmakelists Txt problems

CD-CompactDisk

pycharm的plt.show()如何保持不关闭

vutils.make_grid()与黑白图像有关的一个小体会

LeetCode 238 除自身以外数组的乘积

博云,站在中国容器潮头

A little experience of next (ITER (dataloader))
随机推荐
Digital signature standard (DSS)
Insert string B into string A. how many insertion methods can make the new string a palindrome string
sql中的几种删除操作
Concept and working principle of data encryption standard (DES)
VCD-影音光碟
Map和List<Map>转相应的对象
行锁分析和死锁
17.13 supplementary knowledge, thread pool discussion, quantity discussion and summary
请指教同花顺开户选选择哪家券商比较好?现在在线开户安全么?
ROS query topic specific content common instructions
清华&商汤&上海AI&CUHK提出Siamese Image Modeling,兼具linear probing和密集预测性能!
非对称密码体制详解
ROS的发布消息Publishers和订阅消息Subscribers
pycharm如何修改多行注释快捷键
A little experience of next (ITER (dataloader))
Map and filter methods for processing scarce arrays
sqlite数据库的系统表sqlite_master
Crawl Douban to read top250 and import it into SqList database (or excel table)
数据加密标准(DES)概念及工作原理
wm_concat()和group_concat()函数