当前位置:网站首页>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
边栏推荐
- Software test system integration project management engineer full truth simulation question (including answer and analysis)
- SAP ui5 application development tutorial 72 - trial version of animation effect setting of SAP ui5 page routing
- [point cloud series] neural opportunity point cloud (NOPC)
- Error 403 in most cases, you or one of your dependencies are requesting
- Common analog keys of ADB shell: keycode
- 面试官给我挖坑:URI中的 “//” 有什么用?
- Is Hongmeng system plagiarism? Or the future? Professional explanation that can be understood after listening in 3 minutes
- [multi screen interaction] realize dual multi screen display II: startactivity mode
- Xi'an CSDN signed a contract with Xi'an Siyuan University, opening a new chapter in IT talent training
- TIA博途中基於高速計數器觸發中斷OB40實現定點加工動作的具體方法示例
猜你喜欢

Esp32 vhci architecture sets scan mode for traditional Bluetooth, so that the device can be searched

Interface idempotency problem

SAP UI5 应用开发教程之七十二 - SAP UI5 页面路由的动画效果设置试读版

Common interview questions and detailed analysis of the latest Android developers in 2020

2020年最新字节跳动Android开发者常见面试题及详细解析

Solve the problem that Oracle needs to set IP every time in the virtual machine

数据仓库—什么是OLAP

ESP32 VHCI架构传统蓝牙设置scan mode,让设备能被搜索到

Loading and using image classification dataset fashion MNIST in pytorch

X509 parsing
随机推荐
TIA博途中基于高速计数器触发中断OB40实现定点加工动作的具体方法示例
【视频】线性回归中的贝叶斯推断与R语言预测工人工资数据|数据分享
QT calling external program
Antd design form verification
Data warehouse - what is OLAP
100000 college students have become ape powder. What are you waiting for?
Stack protector under armcc / GCC
Xi'an CSDN signed a contract with Xi'an Siyuan University, opening a new chapter in IT talent training
Resolution: argument 'radius' is required to be an integer
The interviewer dug a hole for me: what's the use of "/ /" in URI?
[barycentric coordinate interpolation, perspective correction interpolation] principle and usage opinions
[point cloud series] unsupervised multi task feature learning on point clouds
The difference between string and character array in C language
【重心坐标插值、透视矫正插值】原理以及用法见解
@优秀的你!CSDN高校俱乐部主席招募!
联想拯救者Y9000X 2020
Ding ~ your scholarship has arrived! C certified enterprise scholarship list released
[point cloud series] learning representations and generative models for 3D point clouds
Opening: identification of double pointer instrument panel
Tersus notes employee information 516 MySQL query (time period uniqueness judgment of 2 fields)