SQL中统计表的个数:
SELECT count(*) FROM sysobjects WHERE XType='U' //表个数 SELECT count(*) FROM sysobjects WHERE XType= 'V' //视图个数 SELECT count(*) FROM sysobjects WHERE XType= 'P' //存储过程个数
SQL获得表名:
SELECT name FROM sysobjects WHERE XTYPE='U'
ORCALE中统计数据表的总个数:
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='用户名'