Hi,
would it be possible to add an option to use fully qualified table names when HeidiSQL generates a query via “Query top xxx rows”?
Currently HeidiSQL generates:
SELECT * FROM tablename LIMIT 1000;
I would prefer:
SELECT * FROM database.tablename LIMIT 1000;
This becomes especially useful when the generated query is modified afterwards, for example:
SELECT *
FROM database.tablename
WHERE ......;
I frequently work with many databases on the same server. If another database becomes the active/default database, an unqualified query can fail with errors such as:
Table 'fuhrpark.fahrzeugart' doesn't exist
Using database.table in generated queries would make them independent of the currently selected database and would also make copying queries between query tabs much safer.
Ideally this could be an optional setting, for example:
“Use fully qualified table names in generated queries”
The same option could possibly also apply to queries generated by the Query Helper.
Thanks!