alter table [表名] add(字段名1 字段類型1, 字段名2 字段類型2, ...); // 添加字段(屬性) alter table [表名] drop(字段名1, 字段名2);
alter table [表名] modify 字段名 字段屬性;
注意:併發
create table [表名] ( 字段名1 字段類型 <default [默認值]> <null | not null>, 字段名2 字段類型 <default [默認值]> <null | not null>, ... )tablespace [表空間名] <storage(initial [塊大小])> 快大小單位能夠是K也能夠是M <pctfree [數值]> 默認是10 <pctused [數值]> 默認是60 <initrans [數值]> 併發事務數量 ;
注意:oracle
pctfree
+ pctused
<=100alter table [舊錶名] rename to [新表名];
重命名操做使用時要格外當心,影響比較大spa
alter table [表名] move tablespace [表空間名];
alter table [表名] [存儲參數1] [更新值1] [存儲參數2] [更新值2]...;
drop table [表名] <cascade constraints> <purge> <cascade constraints>:刪除表的時候連同表的約束、關聯的視圖、觸發器等 <purge>:通常刪除的表都不會被直接刪除,而是放在回收站中,能夠經過快閃技術恢復表,若是不但願表被恢復能夠加這個選項
alter table [表名] read only; // 表只讀 alter table [表名] read write; // 表讀寫
注意:code