Oracle操作表,字段

2021-05-31 21:47:20 字數 481 閱讀 9076

0.建立表

create table table_name as select * from table_name_b;

1.oracle 修改表名

alter table old_table_name rename to new_table_name;(大寫為系統命令)

2.oracle通過altertable增刪改列的語法

alter table tablename add (column datatype [default value][null/not null],…);

alter table tablename modify (column datatype [default value][null/not null],…);

alter table tablename drop (column);

alter table table_name rename column col_old to col_new;

Oracle表,字段,列操作

1 新增字段 alter table student add age number 5 2 修改字段 alter table student modify age number 10 alter table table2 rename column result to result2 3 刪除字段 ...

Oracle表字段操作,增 刪 改

alter table tablename add column datatype default value null not null alter table tablename modify column datatype default value null not null alter t...

oracle修改表字段

增加字段 alter table docdsp add dspcode char 200 刪除字段 alter table table name drop column column name 修改字段型別 alter table table name alter column column nam...