Sql 如何从模式1访问表到模式2?

Sql 如何从模式1访问表到模式2?,sql,oracle,Sql,Oracle,如何从模式1访问表到模式2?您只需通过在查询中添加模式名称来从另一个模式访问表 select * from schema1.table; 但这还不够。您仍然可以得到表不存在的错误,因为尝试访问表的用户需要有权限才能选择它。因此,在schema1或sys上,您需要执行: grant select on schema1.table to schema2; 从schema1.table中选择*加入schema2.table你试过阅读吗?

如何从模式1访问表到模式2?

您只需通过在查询中添加模式名称来从另一个模式访问表

select * from schema1.table;
但这还不够。您仍然可以得到表不存在的错误,因为尝试访问表的用户需要有权限才能选择它。因此,在
schema1
sys
上,您需要执行:

grant select on schema1.table to schema2;

从schema1.table中选择*加入schema2.table你试过阅读吗?