Query two tables from different schema

前端 未结 5 1948
醉话见心
醉话见心 2020-12-17 19:30

I have two different schemas in Oracle (say S1, S2) and two tables in those schemas (say S1.Table1, S2.Table2). I want to query these two tables from schema S1.

Both

5条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-17 19:56

    You won't need a database link if the two schemas are in the same database.

    Your query should work from schema S1, provided S1 has been granted the SELECT privilege on S2.table2 (from a dba account or from the S2 schema: GRANT SELECT ON S2.Table2 TO S1).

提交回复
热议问题