dbeaver

DBeaver: how to switch database in SQL editor?


I'm using DBeaver with PostgreSQL. I can open a new SQL editor with Ctl+[

But I have multiple databases in my PostgreSQL. How can I have the SQL editor run against another database?

The following doesn't work:

use <db name>;
select * from <table name>;

dbeaver ui


Solution

  • You can change the currently selected database when you create new sql tabs by selecting it from the dropdown.

    dbeaver change database

    When you do so be sure to double-click on the schema you want to bring into focus. Then you can open new sql editors with ctrl+].