一个数据库可以有多个表空间,一个表空间里可以有多个表。表空间就是存多个表的物理空间; 可以指定表空间的大小位置等。
创建表空间:create tablespace ts1 datafile'C:\tablespace\ts1.dbf' size 50M;
自动扩展大小:create tablespace ts2 datafile'C:\tablespace\ts2.dbf' size50M autoextend on next 10M;
设置最大空间:create tablespace ts3 datafile'C:\tablespace\ts3.dbf' size 50M autoextend on next 10M maxsize 1024M;
更改用户默认表空间:alter database default tablespacets1;
表空间改名:altert tablespace ts1 rename to tss1;
删除表空间:drop tablespace ts2 including contents and datafiles;
注意删除表空间其物理地址依旧存在,需要手动删除