Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Querying using multiple databases (connections) in dbeaver

I want to access multiple databases(multiple connections) at once in dbeaver and to the SQL querying. As an example, I have 3 data connections: A, B and C.

I want to run a query like this:

select * from A
left join B on A.column=B.column
left join C on A.column=C.column

Is this not allowed in dbeaver?

like image 873
user11607046 Avatar asked Aug 04 '26 09:08

user11607046


1 Answers

This is an old question, but for anyone who else who lands here one answer is to use database level tools. For Postgres you can use something like dblink (see dblink_connect as well)

SELECT dblink_connect('conn_name', 'connection string');

WITH remote as (SELECT * FROM dblink('conn_name', 'query'))
SELECT * FROM local_table
JOIN remote ON local_table.column = remote.column
like image 138
General4077 Avatar answered Aug 07 '26 01:08

General4077