这是假设您可以访问DBA_TABLES数据字典视图。如果您没有这些权限但需要它们,您可以请求DBA显式授予您对该表的权限,或者DBA授予您SELECT ANY DICTIONARY权限或SELECT_CATALOG_ROLE角色(两者中的任何一个都允许您查询任何数据字典表)。当然,您可能希望排除某些模式,如SYS和SYSTEM,它们有大量您可能不关心的Oracle表。
-- need to have select catalog roleSELECT * FROM dba_tables;
-- to see tables of your schemaSELECT * FROM user_tables;
-- tables inside your schema and tables of other schema which you possess select grants onSELECT * FROM all_tables;
SQL> alias list tablestables - tables <schema> - show tables from schema--------------------------------------------------
select table_name "TABLES" from user_tables