zoukankan      html  css  js  c++  java
  • oracle 表空间Tablespaces

    1.表空间

    一个数据库可以有多个表空间,一个表空间里可以有多个表。表空间就是存多个表的物理空间; 可以指定表空间的大小位置等。

    创建表空间:create tablespace ts1 datafile 'C: ablespace s1.dbf' size 50M;

    自动扩展大小:create tablespace ts2 datafile 'C: ablespace s2.dbf' size 50M autoextend on next 10M;

    设置最大空间:create tablespace ts3 datafile 'C: ablespace s3.dbf' size 50M autoextend on next 10M maxsize 1024M;

    更改用户默认表空间:alter database default tablespace ts1;  --- 更改的是当前登录用户的默认表空间

              ---------  用户的默认表空间在视图 BDA_USERS中查看

    表空间改名:alter tablespace ts1 rename to tss1;

    删除表空间:drop tablespace ts2 including contents; 只能删除没有用户占用的表空间

    2.oracle 表

    在PL/SQL下操作表的时候,select * from t  for update ,可以修改从table中查出来的数据。

    此外,在建表的时候,如果选择了非登录者的表的所有者,那么在查询和操作的时候需要通过    用户.表名 来实现,例如:select * from scott.dept

    3. oracle虚表:

    Dual 表是 sys 用户下的一张虚表;

    提供一些运算和日期操作时候用到;

    select sysdate from dual;

  • 相关阅读:
    [笔记] 《我的第一本c++书》
    [c++] 输入输出
    [c++] STL 标准算法
    [c++] 模板、迭代器、泛型
    [计算机科学] 图灵机
    shell专题(五):运算符
    shell专题(四):Shell中的变量
    shell专题(三):Shell脚本入门
    shell专题(二):Shell解析器
    shell专题(一):Shell概述
  • 原文地址:https://www.cnblogs.com/getchen/p/8418234.html
Copyright © 2011-2022 走看看