当前位置:网站首页>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
边栏推荐
- Loading and using image classification dataset fashion MNIST in pytorch
- Interface idempotency problem
- 5 tricky activity life cycle interview questions. After learning, go and hang the interviewer!
- Migrating your native/mobile application to Unified Plan/WebRTC 1.0 API
- X509 parsing
- Armv8m (cortex M33) MPU actual combat
- 面试官给我挖坑:单台服务器并发TCP连接数到底可以有多少 ?
- Esp32 vhci architecture sets scan mode for traditional Bluetooth, so that the device can be searched
- Unified task distribution scheduling execution framework
- 你和42W奖金池,就差一次“长沙银行杯”腾讯云启创新大赛!
猜你喜欢
Usereducer basic usage
SAP ui5 application development tutorial 72 - trial version of animation effect setting of SAP ui5 page routing
SAP UI5 应用开发教程之七十二 - SAP UI5 页面路由的动画效果设置试读版
Set Jianyun x Feishu Shennuo to help the enterprise operation Department realize office automation
面试官给我挖坑:URI中的 “//” 有什么用?
AI21 Labs | Standing on the Shoulders of Giant Frozen Language Models(站在巨大的冷冻语言模型的肩膀上)
vscode小技巧
Riscv MMU overview
Cross carbon market and Web3 to achieve renewable transformation
[point cloud series] learning representations and generative models for 3D point clouds
随机推荐
MySQL 8.0.11 download, install and connect tutorials using visualization tools
Uninstall MySQL database
POM of SSM integration xml
[official announcement] Changsha software talent training base was established!
JS time to get this Monday and Sunday, judge the time is today, before and after today
Zero copy technology
Common interview questions and detailed analysis of the latest Android developers in 2020
Feature Engineering of interview summary
2021年6月程序员工资统计,平均15052元,你拖后腿了吗?
SAP UI5 应用开发教程之七十二 - SAP UI5 页面路由的动画效果设置试读版
爱可可AI前沿推介 (4.23)
数据仓库—什么是OLAP
Android clear app cache
torch. Where can transfer gradient
TCP reset Gongji principle and actual combat reproduction
Lenovo Savior y9000x 2020
浅谈js正则之test方法bug篇
Part 3: docker installing MySQL container (custom port)
缘结西安 | CSDN与西安思源学院签约,全面开启IT人才培养新篇章
5 tricky activity life cycle interview questions. After learning, go and hang the interviewer!