一、查看有哪些库,你的库理解不准确,应该准确来说是表空间,可以通过下面的命令来实现
1
2
3
4
5
6
7
8
9
10
11
12
13
SELECT Total.name "Tablespace Name",
Free_space, (total_space-Free_space) Used_space, total_space
FROM
(select tablespace_name, sum(bytes/1024/1024) Free_Space
from sys.dba_free_space
group by tablespace_name
) Free,
(select b.name, sum(bytes/1024/1024) TOTAL_SPACE
from sys.v_$datafile a, sys.v_$tablespace B
where a.ts# = b.ts#
group by b.name
) Total
WHERE Free.Tablespace_name = Total.name
二、查看有哪些表。
1
select table_name from dba_tables where owner='A'
在查询分析器中,打开对象浏览器(通过F8打开或关闭),展开用户表,就可以查看所有的表和列。另外,也可以这样通过查询语句查询所有用户表及其构:
SELECT TABLENAME=A.NAME,FIELDNAME=B.NAME,C.NAME,B.LENGTH FROM SYSOBJECTS A,SYSCOLUMNS B,SYSTYPES C WHERE A.ID=B.ID AND B.XTYPE=C.XTYPE AND A.TYPE='U' ORDER BY A.NAME
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)