当前位置:网站首页>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
边栏推荐
- 决策树与随机森林
- 如何创建并强制使用索引
- Procedure steps for burning a disc
- tag动态规划-刷题预备知识-2. 0-1背包理论基础和二维数组解法模板
- (multi threading knowledge points that must be mastered) understand threads, create threads, common methods and properties of using threads, and the meaning of thread state and state transition
- ROS query topic specific content common instructions
- Detailed explanation of asymmetric cryptosystem
- 刻录光盘的程序步骤
- 行锁与隔离级别案例分析
- Properties file garbled
猜你喜欢

RSA概念详解及工具推荐大全 - lmn

爬取豆瓣读书Top250,导入sqlist数据库(或excel表格)中

CLion断点单步调试

Paging query and join Association query optimization

Case study of row lock and isolation level

Do you know how to compare two objects

Leetcode 128 longest continuous sequence

你了解如何比较两个对象吗

非对称密码体制详解

Runtimeerror: CUDA error: out of memory own solution (it is estimated that it is not applicable to most people in special circumstances)
随机推荐
[QNX] Command
MYSQL的下载与配置 mysql远程操控
ROS query topic specific content common instructions
Dos et détails de la méthode d'attaque
零时科技 | 智能合约安全系列文章之反编译篇
Detailed explanation of MySQL mvcc mechanism
transforms.RandomCrop()的输入只能是PIL image 不能是tensor
Binary search-1
Clion compiling catkin_ WS (short for ROS workspace package) loads cmakelists Txt problems
Clion breakpoint single step debugging
带你解决哈希冲突,并实现一个简单hash表,
Leetcode 128 longest continuous sequence
Case study of row lock and isolation level
Crawl Douban to read top250 and import it into SqList database (or excel table)
Row lock analysis and deadlock
Static registration and dynamic registration of JNI
Tsinghua & Shangtang & Shanghai AI & CUHK proposed Siamese image modeling, which has both linear probing and intensive prediction performance!
JS 常用正则表达式
ZCMU--1367: Data Structure
MySQL download and configuration MySQL remote control