oracle 表操作
表
1.create a table
sql> create table table_name (column datatype,column datatype]....)
sql> tablespace tablespace_name [pctfree integer] [pctused integer]
sql> [initrans integer] [maxtrans integer]sql> storage(initial 200k next 200k pctincrease 0 maxextents 50)
sql> [logging|nologging] [cache|nocache]
2.copy an existing table
sql> create table table_name [logging|nologging] as subquery
3.create temporary table
sql> create global temporary table xay_temp as select * from xay;
on commit preserve rows/on commit delete rows
4.pctfree = (average row size - initial row size) *100 /average row size
pctused = 100-pctfree- (average row size*100/available data space)
5.change storage and block utilization parameter
sql> alter table table_name pctfree=30 pctused=50 storage(next 500k minextents 2 maxextents 100);
6.manually allocating extents
sql> alter table table_name allocate extent(size 500k datafile 'c:/oracle/data.dbf');
7.move tablespace
sql> alter table employee move tablespace users;
8.deallocate of unused space
sql> alter table table_name deallocate unused [keep integer]
9.truncate a table
sql> truncate table table_name;
10.drop a table
sql> drop table table_name [cascade constraints];
11.drop a column
sql> alter table table_name drop column comments cascade constraints checkpoint 1000;
alter table table_name drop columns continue;
12.mark a column as unused
sql> alter table table_name set unused column comments cascade constraints;
alter table table_name drop unused columns checkpoint 1000;
alter table orders drop columns continue checkpoint 1000
data_dictionary : dba_unused_col_tabs
[@more@]來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/52450/viewspace-989967/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- oracle表空間操作Oracle
- Oracle 表空間 的操作Oracle
- 傳輸表空間操作-OracleOracle
- oracle表空間日常操作管理Oracle
- Oracle表空間操作詳解Oracle
- Oracle表空間相關操作Oracle
- oracle 分割槽表進行shrink操作Oracle
- Oracle SQL 基本操作之 表空間OracleSQL
- oracle 10g表空間操作Oracle 10g
- ORACLE分割槽表的概念及操作Oracle
- ORACLE分割槽表的操作應用Oracle
- 【Oracle】刪除大表操作一則Oracle
- oracle 分割槽表 概念以及常用操作Oracle
- Oracle恢復誤操作刪除掉的表Oracle
- 索引回表操作,ORACLE所作的優化索引Oracle優化
- oracle truncate table recover(oracle 如何拯救誤操作truncate的表)Oracle
- Oracle切換undo表空間操作步驟Oracle
- Oracle 操作表結構基本語法及示例Oracle
- Oracle - 表空間相關常用操作語句Oracle
- ORACLE普通錶轉換成分割槽表的操作Oracle
- Oracle表空間操作詳解-入門基礎Oracle
- oracle 臨時表空間基本常識和操作Oracle
- 表的操作
- MySQL操作表MySql
- 表單操作
- CK表操作
- Oracle表連線操作——Hash Join(雜湊連線)下Oracle
- oracle資料庫之plsql視覺化操作建表Oracle資料庫SQL視覺化
- Oracle表連線操作——Hash Join(雜湊連線)上Oracle
- Oracle資料庫中分割槽表的操作方法Oracle資料庫
- Oracle 10g的可傳輸表空間操作Oracle 10g
- 利用Oracle GoldenGate記錄源系統所有表的操作OracleGo
- oracle資料庫叢集新增表空間操作規範Oracle資料庫
- Oracle資料庫中分割槽表的操作方法(轉)Oracle資料庫
- 05-表操作
- orm單表操作ORM
- javascript操作表單JavaScript
- 操作樣式表