当前位置:网站首页>MySQL中的alter table操作之add/modify/drop列
MySQL中的alter table操作之add/modify/drop列
2022-06-29 09:26:00 【一缕阳光a】
alter table的操作有增加列、删除列和修改列的长度等
create table t1 (c1 int primary key) engine = innodb;
// 增加一个列c2
alter table t1 add c2 varchar(16379);
drop table t1;
create table t1 (c1 int primary key, c2 varchar(50)) engine = innodb;
// 将列c2长度更改
alter table t1 modify column c2 varchar(16234);
drop table t1;
// 删除一个列c2
create table t1 (c1 int primary key, c2 varchar(50)) engine = innodb;
alter table t1 drop column c2;
drop table t1;边栏推荐
- Codeforces Round #641 Div2
- Substring score - Ultra detailed version - the last programming challenge
- 2020-9-14 introduction to advertising system
- DevExpress的双击获取单元格数据
- Shanke's C language 2018 exercise (Telecom)
- acwing271【杨老师的照相排列】【线性DP】
- 2019.10.6 training summary
- URAL1517 Freedom of Choice 【后缀数组:最长公共连续子串】
- Acwing271 [teacher Yang's photographic arrangement] [linear DP]
- Memory layout of JVM objects
猜你喜欢
随机推荐
时变和非时变
2021年团体程序设计天梯赛-模拟赛
使用Rancher搭建Kubernetes集群
September 25, 2020 noncopyable of boost library for singleton mode
HDU 4578 Transformation(线段树+有技巧的懒标记下放)
2019.11.20 training summary
Analysis of liferayportal jsonws deserialization vulnerability (cve-2020-7961)
指针数组、数组指针和传参的相关问题
Dsolve function of sympy
在VMware workstation中安装WMware ESXi 6.5.0并进行配置
To 3 -- the last programming challenge
L1-009 N个数求和 (20 分)
JVM instructions for four call methods
Codeforces Round #645 (Div. 2)
1146 Topological Order (25 分)
山科 的C语言2018练习题(电信)
2019.10.6训练总结
2020-09-18 referer authentication URL escape
同花顺炒股软件可靠吗,安全吗?
L2-025 分而治之 (25 分)







