SQL中统计表的个数:
SELECT count(*) FROM sys.objects WHERE XType='U' //表个数SELECT count(*) FROM sys.objects WHERE XType= 'V' //视图个数
SELECT count(*) FROM sys.objects WHERE XType= 'P' //存储过程个数
SQL获得表名:
SELECT name FROM sys.objects WHERE XTYPE='U'
SELECT count(*) FROM dba_tables WHERE owner='用户名' ————有DBA权限
SELECT count(*) FROM all_tables WHERE owner='用户名' ————普通用户权限
ORCALE获得表名:
SELECT name FROM dba_tables WHERE owner='用户名'
SELECT name FROM all_tables WHERE owner='用户名'