-
alter tablespace test1_space online/offline(改变表空间状态); select status from dba_tablespaces where tablespace_name=“TEST1_TABLESPACE”(查询表空间的状态) alter tablespace test1_tablespace read only;(设置表空间为只读状态) select status from dba_tablespaces where tablespace_name="TEST1_TABLESPACE"(查询即为read only 默认联机状态就是读写状态_ [ 查看全文 ] 3小时前查看全部
-
create tablespace test1_tablespace datafile 'test1file.dbf' size 10m; 大小10M的永久表空间 create temporary tablespace temptest1_tablespace tempfile 'tempfile1.dbf' size 10m; 大小10M的临时表空间 select file_name from dba_data_files where tablespace_name='TEST1_TABLESPACE';【表空间名要大写】查看全部
-
truncate table new_userinfo 截断表,只删除表数据,不删除表,并且删除的数据是不可恢复的; delete from new_userinfo删除表数据,数据可恢复; drop table new_userinfor 删除表(删除表结构,同时数据也就删除了)查看全部
-
增加字段:alter table userinfo(表名) add remarks(列名) varchar2(500); 修改字段的数据类型: alter table userinfo(表名) modify column_name new_datatype; 删除字段:alter table userinfo(表名) drop column_name; 修改表中的字段名: alter table userinfo(表名) rename column column_name to new_column_name; 修改表名:rename 旧表名 to 新表名;查看全部
-
字符型 char(n<2000) nchar(n<1000)汉字n为长度;varchar2(可变长度)nvarchar2(uni类型); 数值型 number(p(有效数字),s(小数点后位数))(5,2)有效数字5位,保留2位小数,float(n)二进制; 日期型date(公元前4712.1.1.到后9999.12.31)精确到秒,timestamp精确到小数秒; 大数据 blob 4g数据(二进制),clob 4g 字符串查看全部
-
删除表空间 DROP TABLESPACE tablespace_name [INCLUDING CONTENTS] --[INCLUDING CONTENTS]删除表空间的同时删除数据文件查看全部
-
修改表空间中的数据文件 一、增加数据文件 alter tablespace tablespace_name add datafile 'xx.dbf' size xx; select file_name from dba_data_files where tablespace_name='表空间名称' 二、删除数据文件 alter tablespace tablespace_name drop datafile 'xx.dbf'查看全部
-
alter tablespace test1_space online/offline(改变表空间状态); select status from dba_tablespaces where tablespace_name=“TEST1_TABLESPACE”(查询表空间的状态) alter tablespace test1_tablespace read only;(设置表空间为只读状态) select status from dba_tablespaces where tablespace_name="TEST1_TABLESPACE"(查询即为read only 默认联机状态就是读写状态_查看全部
-
设置用户的默认或临时表空间。alert user username default|temporary tablespace tablespace_name;查看全部
-
查看用户的表空间,dba_tablespaces,user_tablespaces.查看全部
-
表,视图,procedure这些放在永久表空间。 数据库操作当中中间执行的过程,当执行过程结束后,存放的内容就会被自动释放掉。 undo表空间,用于事务所修改数据的旧值。查看全部
-
表空间的分类查看全部
-
create tablespace test1_tablespace datafile 'test1file.dbf' size 10m;大小10M的永久表空间 create temporary tablespace temptest1_tablespace tempfile 'tempfile1.dbf' size 10m;大小10M的临时表空间 select file_name from dba_data_files where tablespace_name='TEST1_TABLESPACE';(表空间名要大写)查看全部
-
dba_tablespaces , dab_users: 系統管理員查看的数据字典 sys、system用户 user_tablespaces , user_users: 普通用戶所查看的数据字典 scott用户 system:系统表空间 example的辅助表空间sysaux:数据库实例 temp:临时 users:数据库用户创建数据库对象查看全部
-
数据库由多个表空间构成,表空间由数据文件构成 表空间——逻辑数据空间 数据文件——物理上的存储 表空间的分类: 1.永久表空间:表,视图等永久存储 2.临时表空间:存储中间过程,暂时存放,自动释放 3.UNDO表空间:保存被修改前信息,数据回滚,撤销操作等查看全部
举报
0/150
提交
取消