-
修改表名称、列名称、列的属性等 1.修改表名: rename table userInfo to new_userInfo; 2.修改列名称 alter table userInfo rename column user to new_user; 3. 修改列属性 alter table userInfo modify password number(20,0); desc userInfo //显示表的结构查看全部
-
nvarchar2和varchar2都可以表示可变长度的字符,其中nvarchar2用于存储Unicode格式的数据,更适合存储中文数据。查看全部
-
删除表空间: drop tablespace 表空间名 [including contents]; 注意:如果只是删除表空间,而不删除其中的数据文件,可以省略including contents 字句; drop tablespace tablespace_name [including contents] (不加‘[including contents]’为只删除表空间;) 例子: drop tablespace test1_tablespace including contents;(删除表空间及表空间下的数据文件)查看全部
-
修改数据文件<br> 1.增加数据文件<br> alter tablespace tablespace_name add datafile 'xxx.dbf' size xx;<br> 2.删除数据文件<br> alter tablespace tablespace_name delete datafile 'xxx.dbf' size xx;查看全部
-
修改表空间的状态<br> 1.设置联机或脱机状态:ALTER TABLESPACE tablespace_name ONLINEOFFLINE; desc dba_tablespaces; select status fromm dba_tablespaces where tablespace_name ='TEST1_TABLESPACE';表空间名要大写,查看表空间状态 2.设置只读或可读状态(默认是可读写):只有在表空间是联机状态才能修改为只读或者读写状态 ALTER TABLESPACE tablespace_name READ ONLYREAD WRITE查看全部
-
创建默认表空和临时表空间 create [temporary] tablespace tablespace_name tempfile datafile 'xx.dbf' size xx //temporary表示临时表空间 不指定路径,默认安装到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 普通用户数据字典 1.desc dba_tablespaces 2.select tablespace_name from dba_tablespaces user_tablespaces dba_users、user_users 查询system的默认表空间和临时表空间: select default_tablespace,temporary_tablespace from dba_users where username='SYSTEM'; 设置用户的默认或临时表空间 ALTER USER username DEFAULTTEMPORARY TABLESPACE tablespace_name查看全部
-
数据库由一个或多个表空间组成,一个表空间只属于一个数据库 表空间分类 1、永久表空间:存放table、视图、存储过程等 2、临时表空间:sql语句执行过程中临时产生的一些对象和数据,执行完毕之后就释放 3、UNDO表空间:存放事务执行之前的原始数据,便于事务失败的回滚查看全部
-
denglu查看全部
-
表空间:逻辑存储空间 1)永久表空间: 永久存储的表/视图等 2)临时表空间: 数据库操作中中间执行的过程, 完了自行删除将不永久保存 3)UNDO表空间: 保存事务所修改的旧值,修改前的数据(利于撤销等方便回滚)查看全部
-
使用系统用户登录查看全部
-
系统用户查看全部
-
创建表空间查看全部
-
设置用户默认或临时表空间查看全部
-
创建格式:create查看全部
举报
0/150
提交
取消