dbeaver / dbeaver/cloudbeaver

programatically change database

Open
#3,778 1 comment 0 reactions 0 assignees View on GitHub
xf:sql editor
Dominant language
TypeScript
Stars
5.1k
Forks
563
Avg merge
3d 9h
Merged PRs (30d)
59

Description

**Is your feature request related to a problem? Please describe.**

I change (MySQL/MariaDB) databases frequently and have come to use SQL scripts without defining an active database using the drop-down at the top bar.

What i do is:

```
@set db_name = my_current_db_name
select * from ${db_name}.table_name;
```

Works, but

- code completion won't show table names after `${db_name}.`
- can't easily delete a row from a result set by right-clocking (because, i assume, there is no active database)

**Describe the solution you'd like**

Something like @set_active_databae = ${db_name}

**Additional context**

Community Version 25.2.0.202508311659

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.