Is there a quick way to view the primary key of a table in DBeaver? Like e.g. in the Eclipse data source explorer, where primary key rows are marked with "PK" and a special symbol.
For a given table, right click on the table name(in Database Navigator) -> select View Diagram.
This will open a window like this containing a single ER Diagram for the table -
In this diagram, the primary keys can be seen marked as bold under the table name, in the second partition.
To have a look at the primary keys of all the tables, in the Database Navigator, go to your database and then right click on public -> select View diagram. This will open the ER diagram for the whole database and the connections between the tables. Here, under each table name, the bold columns are the primary keys.
Note: A primary key can be a single key as well as a combination of multiple keys.
As per this github post, some database types (at least MySQL and PostgreSQL) show a small lightbulb to the left of the column name. This is visible in the Properties, Data and ER Diagram tabs.
Example with PostgreSQL:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With