oracle 查询

1.查询当前用户下所有的表名:

SELECT TABLE_NAME FROM USER_TABLES

2.查询空表

select table_name from user_tables where NUM_ROWS=0;

3.查询数据库的所有表空间的数据文件

SELECT * FROM DBA_DATA_FILES;
4.查看所有表空间大小
 select tablespace_name,sum(bytes)/1024/1024 from dba_data_files   group by tablespace_name;
5.已经使用的表空间大小
 select tablespace_name,sum(bytes)/1024/1024 from dba_free_space  group by tablespace_name;

posted @ 2015-07-30 17:02  ls-smile  阅读(160)  评论(0编辑  收藏  举报