ITPub博客

首页 > 数据库 > Oracle > Oracle初学者问题5(转)

Oracle初学者问题5(转)

原创 Oracle 作者:tigeerfish 时间:2007-08-07 08:26:41 0 删除 编辑
Oracle初学者问题5(转)
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[@more@]

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/8227599/viewspace-932897/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
  • 博文量
    387
  • 访问量
    870227