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

后端 未结 1 1049
灰色年华
灰色年华 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 ..

    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)
提交回复
热议问题