Oracle数据库空间管理
創建表空間
?????????? create tablespace re_segs
?? ? ? ? ? datafile 'E:\Database\datashow.dbf'
?? ? ? ??? 注釋:datafile表示表空間的物理路徑
?????????? re_segs表示表空間名字
創建臨時表空間
? create temporary tablespace? temp
??? tempfile 'E:\Database\datatemp.dbf'
??? ? Authoextend on
?? ? 注釋:tempfile表示臨時表空間的物理路徑
?????????? Authoextend on表示自動增長
修改表空間
?? ? alter tablespace re_resg
???? add datafile 'E:\Database\dataNewshow.dbf'
???? size 5M
??? 注釋:size表示空間大小
設置默認的表空間
?? ?? alter database default tablespace re_segs
刪除表空間
? ??? drop tablespace re_segs including contents
?????????? 注釋:including contents表示刪除包含所以的邏輯和內容
創建索引
?? create [unique] index index_name
?? ?? on 表名(列名1,列名2...)
?? where 條件
創建位圖
? create bitmap index on 表名(列名)
修改索引
? 重載索引:alter index 索引名 rebuild
? 合并索引:alter index 索引名 coalesce
刪除索引
? ? ? ? ? drop index 索引名
創建視圖
??? create [or replace] view view_name
? ? [colum1,column]
? ? as
?? [SQL語句]
? ? 注釋:or replace 表示不斷重建視圖,替換
刪除視圖
? ? drop view 視圖名
創建同義詞
? create synonym 名字? for 表名
刪除視圖
? drop synonym 名字
創建序列
? create sequence 序列名
?? ? start with 1
?? ? increment by 1
? ? ? ? maxvalue 500
????? ? cycle
? ? ? ? cache
? /*注釋:start with 表示開始數字
??? ?? increment by 表示增量
??? ?? maxvalue 最大值
??? ?? cycle 循環
???? ? cache 緩存
???? ? currval返回當前的值
???? ? nextval返回序列的下一個值*/
更改序列
??? alter sequence 序列名
?? ? ? [increment by n]
?? ? ? [maxvalue n|nomaxvalue]
?? ? ? [minvalue n|nominvalue];
刪除序列
?????? drop sequence 序列名
?
詳細內容請點擊Oracle數據庫空間管理查看:
?
?
?
轉載于:https://www.cnblogs.com/ranfang/p/3490946.html
總結
以上是生活随笔為你收集整理的Oracle数据库空间管理的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 北航专业院系英文
- 下一篇: weinre调试移动端页面