Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用查询从数据库中选择所有表
select table_name from all_tables where owner='XYZ' order by table_name
但上面的查询也返回物化视图。我怎样才能只得到表格而不是物化视图
您可以忽略物化视图及其日志表(如果存在)
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)