创建一个测试表
create table tableName( id varchar2(32), create_date date, bank_acc varchar2(32), acc_name VARCHAR2(200), check_status char(1), primary key(id) ); comment on table tablename is ‘建表测试表名’; comment on column tablename.create_date is ‘创建时间’; comment on column tablename.bank_acc is ‘账号’; comment on column tablename.acc_name is ‘账号名称’; comment on column tablename.check_status is ‘账号状态’; insert into tablename (id, create_date,bank_acc,acc_name,check_status) values (sys_guid(), sysdate, ‘123321’, ‘张三’, ‘1’);
修改字段类型大小
alter table tablename modify(acc_name char(120));
修改字段名称
alter table tablename rename column acc_name to new_Name ;
新增加一个字段
alter table tablename add add_char char(1);
删除一个字段
alter table tablename drop column add_char;
|