当前位置:网站首页>Modification of table fields by Oracle
Modification of table fields by Oracle
2022-04-23 13:40:00 【Wangcai 2】
Main operation :1. Add fields ;2. Delete field ;3. Modify fields ( Change the type of field , Modify the length of the field )
1. Add fields :
You can always succeed , The newly added field appears at the end of the table .
alter table student
add tel varchar2(11);
alter table student
add addr varchar2(11);
2. Delete field :
You can always succeed , Whether there is data or not , Can be deleted .
alter table student
drop column addr
3. Modify fields :
A. When there is no data in this field , Type of field , The length of the field can be modified .
alter table student
modify tel number(11);
alter table student
modify addr varchar(20);
B. Modification of default values , It will not affect the existing data , It will only affect the data inserted later .
alter table student
modify sex char(2) default ' Woman ';
C. When the field has data, the type of the field cannot be modified , But the length of the field can be modified ( The length can be increased , Smaller depends on the actual length of the data ).
alter table student
modify grade varchar(8);
版权声明
本文为[Wangcai 2]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230604301489.html
边栏推荐
- 【官宣】长沙软件人才实训基地成立!
- [point cloud series] pointfilter: point cloud filtering via encoder decoder modeling
- Opening: identification of double pointer instrument panel
- 顶级元宇宙游戏Plato Farm,近期动作不断利好频频
- Stack protector under armcc / GCC
- Plato farm, a top-level metauniverse game, has made frequent positive moves recently
- Tangent space
- Common analog keys of ADB shell: keycode
- [point cloud series] unsupervised multi task feature learning on point clouds
- 面试官给我挖坑:单台服务器并发TCP连接数到底可以有多少 ?
猜你喜欢
Example interview | sun Guanghao: College Club grows and starts a business with me
100000 college students have become ape powder. What are you waiting for?
【官宣】长沙软件人才实训基地成立!
TIA博途中基于高速计数器触发中断OB40实现定点加工动作的具体方法示例
叮~ 你的奖学金已到账!C认证企业奖学金名单出炉
UEFI learning 01-arm aarch64 compilation, armplatformpripeicore (SEC)
Explanation of input components in Chapter 16
LeetCode_ DFS_ Medium_ 695. Maximum area of the island
“湘见”技术沙龙 | 程序员&CSDN的进阶之路
十万大学生都已成为猿粉,你还在等什么?
随机推荐
JS compares different elements in two arrays
Plato farm, a top-level metauniverse game, has made frequent positive moves recently
@Excellent you! CSDN College Club President Recruitment!
Filter and listener of three web components
vscode小技巧
QT调用外部程序
Campus takeout system - "nongzhibang" wechat native cloud development applet
Remove the status bar
校园外卖系统 - 「农职邦」微信原生云开发小程序
Part 3: docker installing MySQL container (custom port)
MySQL 8.0.11 download, install and connect tutorials using visualization tools
你和42W奖金池,就差一次“长沙银行杯”腾讯云启创新大赛!
叮~ 你的奖学金已到账!C认证企业奖学金名单出炉
浅谈js正则之test方法bug篇
Opening: identification of double pointer instrument panel
TERSUS笔记员工信息516-Mysql查询(2个字段的时间段唯一性判断)
TCP reset Gongji principle and actual combat reproduction
【重心坐标插值、透视矫正插值】原理以及用法见解
[point cloud series] unsupervised multi task feature learning on point clouds
Aicoco AI frontier promotion (4.23)