MySQL Forums
Forum List  »  MySQL Workbench

Feature Request: Only show database names in generated SQL queries if necessary
Posted by: Nicholas Hope
Date: January 29, 2024 02:35AM

When applying changes that have been made in the Result Grid, the SQL Script is always shown with fully-qualified table names, including the database name, even if the default database has been set or there is only 1 database.

I like to copy those SQL queries (select > CTRL+C) so I can paste them into other environments to run. Those other environments have the same table names, but sometimes different database names. Therefore I have to edit the queries in a text editor to change or remove the database name from them before pasting and running them in the other environment.

So I would like a feature to not show database names in generated queries. It might be a button or checkbox on the "Apply SQL Script to Database" window. Or it might be a preference such as "Only show database names in generated SQL queries if necessary" (i.e. There is more than 1 database and no default database has been selected).

As a reference, in DBeaver the feature is a "Use fully qualified names" checkbox on the "Preview changes" window (although unfortunately the box has to be unchecked every time).

Options: ReplyQuote


Subject
Views
Written By
Posted
Feature Request: Only show database names in generated SQL queries if necessary
108
January 29, 2024 02:35AM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.