mtxr / vscode-sqltools

Database management for VSCode
https://vscode-sqltools.mteixeira.dev?utm_source=github&utm_medium=homepage-link
MIT License
1.45k stars 292 forks source link

Ability to create a connection without database name (cross-database query) #1077

Open storm1er opened 1 year ago

storm1er commented 1 year ago

Is your feature request related to a problem? Please describe. Explicit title: As we can't create a connection without a database name, we can't execute cross-database query

Use case: I have 20 databases on the same MySQL server. There's no workaround to run the same query 20 times, the only way is to create a connection for each database even if it's on the same server.

Describe the solution you'd like

Describe alternatives you've considered No workaround is available for now except running the cross-database request using another software

gjsjohnmurray commented 1 year ago

Related to #727

gjsjohnmurray commented 1 year ago

When you connect to your MySQL server does the tree show all 20 databases, with the one you named in the connection being first, followed by the other 19 in alpha order?

When you run a SELECT in which you prefix the table name(s) with databasename. do you get the data from the expected place?

storm1er commented 1 year ago

For now the workaround has been to create a connection using "mysql" as database name (config database) ... I'm able to see all databases afterwards