oracle表中增加字段 sql语句,ORACLE中通过SQL语句(alter table)来增加、删除、修改字段...

1.添加字段:

alter table  表名  add (字段  字段类型)  [ default  '输入默认值']  [null/not null]  ;

2.添加备注:

comment on column  库名.表名.字段名 is  '输入的备注';  如: 我要在ers_data库中  test表 document_type字段添加备注  comment on column ers_data.test.document_type is '文件类型';

3.修改字段类型:

alter table 表名  modiy (字段  字段类型  [default '输入默认值' ] [null/not null]  ,字段  字段类型  [default '输入默认值' ] [null/not null] ); 修改多个字段用逗号隔开

4.删除字段:

alter table  表名  drop (字段);

本文转载自:https://www.cnblogs.com/kobigood/p/6293955.html

sql语句-ALTER TABLE

在工作中常遇到要维护数据库表的列,这里主要介绍sql语句中的ALTER TABLE 语句.ALTER TABLE 语句用于在已有的表中添加.修改或删除列. 如需在表中添加列,请使用下列语法: ALTE ...

oracle中查看sql语句的执行计划

1.在pl/sql中打开cmd命令容器 2.在cmd命令窗口中输入:explain plan for select * from t; 3.查看sql语句的执行计划:select * from tab ...

oracle中使用sql语句生成10w条测试数据

sql语句 create table A

你可能感兴趣的:(oracle表中增加字段,sql语句)