Oracle初学者问题5(转)[@more@]41. 如何给表、列加注释?
SQL>comment on table 表 is '表注释';
注释已创建。
SQL>comment on column 表.列 is '列注释';
注释已创建。
SQL> select * from user_tab_comments where comments is not null;
42. 如何查看各个表空间占用磁盘情况?
SQL> col tablespace format a20
SQL> select
.file_id 文件ID号,
.tablespace_name 表空间名,
.bytes 字节数,
(b.bytes-sum(nvl(a.bytes,0))) 已使用,
um(nvl(a.bytes,0)) 剩余空间,
um(nvl(a.bytes,0))/(b.bytes)*100 剩余百分比
from dba_free_space a,dba_data_files b
where a.file_id=b.file_id
group by b.tablespace
SQL>comment on table 表 is '表注释';
注释已创建。
SQL>comment on column 表.列 is '列注释';
注释已创建。
SQL> select * from user_tab_comments where comments is not null;
42. 如何查看各个表空间占用磁盘情况?
SQL> col tablespace format a20
SQL> select
.file_id 文件ID号,
.tablespace_name 表空间名,
.bytes 字节数,
(b.bytes-sum(nvl(a.bytes,0))) 已使用,
um(nvl(a.bytes,0)) 剩余空间,
um(nvl(a.bytes,0))/(b.bytes)*100 剩余百分比
from dba_free_space a,dba_data_files b
where a.file_id=b.file_id
group by b.tablespace
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9417382/viewspace-932306/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/9417382/viewspace-932306/
1050

被折叠的 条评论
为什么被折叠?



