Reputation: 2715
Is there a way to make datagrip define the columns table names every time when I use the lightbulb to expand the column list from SELECT *
. Right now, it will only explicitly define the table if there are 2 fields that are in common among the tables. I wish for it to do it for all the columns.
--example of what it does now
SELECT
a.id
, number
, name
, b.id
FROM a
INNER JOIN b ON a.id = b.a_id
--Desired result with all columns prefixed
SELECT
a.id
, a.number
, a.name
, b.id
FROM a
INNER JOIN b ON a.id = b.a_id
Upvotes: 0
Views: 1041
Reputation: 10335
Yes.
Go to Settings | Editor | General | Smart keys
Go to SQL section
Put Always into Table and Alias
PS: you can also select all needed columns -> Alt+Enter -> Qualify.
Upvotes: 6