当前位置:网站首页>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] summary of papers related to implicit expression of point cloud
- SHA512 / 384 principle and C language implementation (with source code)
- [point cloud series] Introduction to scene recognition
- Error 403 in most cases, you or one of your dependencies are requesting
- Solution: you have 18 unapplied migration (s) Your project may not work properly until you apply
- Solve the problem that Oracle needs to set IP every time in the virtual machine
- Antd design form verification
- XML
- "Xiangjian" Technology Salon | programmer & CSDN's advanced road
- Imx6ull QEMU bare metal tutorial 2: usdhc SD card
猜你喜欢
kettle庖丁解牛第16篇之输入组件周边讲解
校园外卖系统 - 「农职邦」微信原生云开发小程序
Exemple de méthode de réalisation de l'action d'usinage à point fixe basée sur l'interruption de déclenchement du compteur à grande vitesse ob40 pendant le voyage de tia Expo
@优秀的你!CSDN高校俱乐部主席招募!
数据仓库—什么是OLAP
ESP32 VHCI架构传统蓝牙设置scan mode,让设备能被搜索到
Summary of request and response and their ServletContext
Ding ~ your scholarship has arrived! C certified enterprise scholarship list released
[point cloud series] summary of papers related to implicit expression of point cloud
联想拯救者Y9000X 2020
随机推荐
联想拯救者Y9000X 2020
How do ordinary college students get offers from big factories? Ao Bing teaches you one move to win!
Antd design form verification
缘结西安 | CSDN与西安思源学院签约,全面开启IT人才培养新篇章
Logstash数据处理服务的输入插件Input常见类型以及基本使用
ESP32 VHCI架构传统蓝牙设置scan mode,让设备能被搜索到
Common types and basic usage of input plug-in of logstash data processing service
FatFs FAT32 learning notes
On the bug of JS regular test method
What does the SQL name mean
100000 college students have become ape powder. What are you waiting for?
Ai21 labs | standing on the shoulders of giant frozen language models
零拷贝技术
[notes de marche]
Common interview questions and detailed analysis of the latest Android developers in 2020
Summary of request and response and their ServletContext
TIA博途中基於高速計數器觸發中斷OB40實現定點加工動作的具體方法示例
[point cloud series] full revolutionary geometric features
Example of specific method for TIA to trigger interrupt ob40 based on high-speed counter to realize fixed-point machining action
Aicoco AI frontier promotion (4.23)