我使用查询
从数据库中选择所有表select table_name from all_tables where owner='XYZ' order by table_name
但上面的查询也返回了物化视图。我怎样才能获得表格而不是物化视图
答案 0 :(得分:4)
您可以使用
忽略实体化视图及其日志表(如果存在)select *
from all_tables t
where owner = user
and (owner, table_name) not in (select owner, mview_name
from all_mviews l
union all
select log_owner, log_table
from all_mview_logs)