本文主要是关于Oracle数据库表中字段的增加、删除、修改和重命名的操作。

增加字段语法:alter table tablename add (column datatype [default value][null/not null],….);

说明:alter table 表名 add (字段名 字段类型 默认值 是否为空);

例:alter table sf_users add (HeadPIC blob);

例:alter table sf_users add (userName varchar2(30) default '空' not null);

修改字段的语法:alter table tablename modify (column datatype [default value][null/not null],….);

说明:alter table 表名 modify (字段名 字段类型 默认值 是否为空);

例:alter table sf_InvoiceApply modify (BILLCODE number(4));

删除字段的语法:alter table tablename drop (column);

说明:alter table 表名 drop column 字段名;

例:alter table sf_users drop column HeadPIC;

字段的重命名:

说明:alter table 表名 rename  column  列名 to 新列名   (其中:column是关键字)

例:alter table sf_InvoiceApply rename column PIC to NEWPIC;

表的重命名:

说明:alter table 表名 rename to  新表名

例:alter table sf_InvoiceApply rename to  sf_New_InvoiceApply;

最新文章

  1. LINUX下的PHP
  2. [译]使用branch
  3. Linux用过的命令
  4. 【转】C# HttpWebRequest\HttpWebResponse\WebClient发送请求解析json数据
  5. Keil 的调试命令、在线汇编与断点设置
  6. 【Android - MD】之TextInputLayout的使用
  7. windows如何获取Win10 Win8 Win8.1版本
  8. 一场刺激的游戏——很文艺的山东省第四届ACM赛总结(菜鸟版)
  9. 重写ViewPager实施单一交有关切换到这个问题,并没有缓存
  10. HDU 4135 Co-prime(容斥+数论)
  11. daemon 启动system V init 和 systemd 配置
  12. css中使用if条件在各大浏览器(IE6\IE7\IE8)中hack方法解决教程
  13. 使用ArcGIS Earth矢量化高精度的数据(kml转图层转shp/要素类)
  14. P1525 关押罪犯
  15. GlusterFS 分布式文件系统的使用入门-管理GlusterFS卷
  16. 数据结构C++实现代码-顺序表
  17. android查看屏幕密度,分辨率的shell命令
  18. n!的位数 斯特林公式
  19. golang xml parent node add attribute without struct
  20. ALGO-115_蓝桥杯_算法训练_和为T(枚举)

热门文章

  1. Android 4.0.3 CTS 测试
  2. C#语言的基础
  3. 完整的定时任务解决方案Spring集成+定时任务本身管理+DB持久化+集群
  4. js的动态加载、缓存、更新以及复用(一)
  5. Ideal Forms – 帮助你建立响应式 HTML5 表单
  6. NodeBB – 基于 Node.js 的开源论坛系统
  7. 《javascript权威指南》读书笔记(连载)
  8. ae_feature的插入、复制和删除
  9. SharePoint 解决打开浏览器自动登录
  10. Creating Custom Connector Sending Claims with SharePoint 2013