Can I join data from 2 different DB2 databases? (Like SQL Server linked databases)

后端 未结 1 1048
灰色年华
灰色年华 2021-01-12 09:42

I\'m enhancing an existing java application. There is data in 2 different DB2 databases. The app already gets data from 2 different databases, but it always does a lookup

相关标签:
1条回答
  • 2021-01-12 10:45

    Use fully qualified name <database>.<user/schema>.<tablename>

    something like:

    select *
    from DB1.myid.remote_orders a
    inner join DB2.local_schema.parts b on (a.key = b.key)
    with ur FETCH FIRST 200 ROWS ONLY
    
    0 讨论(0)
提交回复
热议问题