1

I want to query a table in another db from within a stored procedure in db2. For example, I am connected to db_a1, and call a stored procedure from within which I need to connect to a table in db_a2.

Is this possible in db2 ?

  • 1
    Yes it's possible. Read the manual about federation. – mustaccio Nov 7 '14 at 15:56
  • Mustaccio is spot on. (In fact he should post that as an answer.) I have supported databases where developers did this exact thing (including federation to databases both local to the same instance and remote from the instance). – Chris Aldrich Nov 12 '14 at 13:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.