-
其他类型: blob 4gb数据(二进制格式的数据) clob 4gb(字符方式存储)查看全部
-
日期型 date 精确到秒 timestamp 能精确到小数秒查看全部
-
数值型 number(p,s) p有效数字,s小数点后位数。 float(n) 存储二进制数据查看全部
-
varchar2(n) n最大值40000 unicode存放 ,nvarchar2(n) n最大值2000 unicode存放查看全部
-
char和nchar区别查看全部
-
字符型 char(n),nchar(n) 固定长度查看全部
-
每一列数据必须具有相同的数据类型 列名唯一 每一行数据的唯一性查看全部
-
表 基本存储单位 二维结构 行和列查看全部
-
删除表空间: drop tablespace tablespace_name 只删除表空间 drop tablespace tablespace_name [including contents];方括号中的会删除表空间的数据文件查看全部
-
增加删除数据文件 alter tablespace tablespace_name add datafile 'xx.dbf' size xx; 查看表空间的数据文件 select file_name from dba_data_file where tablespace_name='表空间名字要大写'; 删除数据文件 alter tablespace tablespace_name drop datafile '表空间名字';不能删除表空间的第一个数据文件,要删除的话,必须删除整个表空间。查看全部
-
修改表空间状态,联机(online)或脱机(offline) alter tablespace tablespace_name online|offline; select status from dba_tablespace where tablespace_name='表空间名字要大写';查看表空间状态 设置只读或可读写状态,默认的是可读写 alter tablespace tablespace_name read only|read write;查看全部
-
创建默认表空和临时表空间 create [temporary] tablespace tablespace_name tempfile | datafile 'xx.dbf' size xx 不指定路径,默认安装到oracle安装目录下 查看表空间具体路径 desc dba_data_file查看数据字典字段 select file_name from dba_data_file where tablespace_name='表空间名字要大写';查看永久表空间数据文件路径 select file_name from dba_temp_file where tablespace_name='表空间名字要大写';查看临时表空间数据文件路径查看全部
-
系统管理员用户查看的数据字典:dba_tablespaces 普通用户查看的数据字典:user_tablespaces 查看数据字典:desc dba_tablespaces/user_tablespaces 查看表空间名字:select tablespace_name from dba_tablespaces/user_tablespaces system表空间:存储system的表、视图、存储过程等(系统表空间) sysaux:example的辅助表空间 example:事例表空间 undotbs1:存储撤销信息 temp:存储sql语句处理的表和索引信息(临时表空间) users:存储数据库用户创建的数据库对象 dba_users:系统用户 user_users:普通用户 dba_users下:查看默认/临时表空间:select default_tablespace,temporary_tablespace from dba_users where username='STSTEM'; 设置用户的默认/临时表空间:alter user username default/temporary tablespace tablespace_name查看全部
-
connect scott/tiger 登录scott查看全部
-
dba_tablespaces系统管理员级别的用户查看数据字典 user_tablespaces普通用户登陆查看的数据字典 desc dba_tablespaces\user_tablespaces查看数据字典的字段 select tablespace_name from dba_tablespaces\user_tablespace;查看表空间名字 system 系统信息 sysaux example辅助 undotbs1 存储撤销信息的 temp (sql语句的索引和表)临时表空间 users (数据库用户创建的数据库对象)永久表空间 example查看全部
举报
0/150
提交
取消