O
O
oe24y2020-10-29 11:50:54
MySQL
oe24y, 2020-10-29 11:50:54

How to display table name prefix in JOIN?

There is a table one and two .
Each of them has a repeating name column .
When I do a JOIN, I get two fields named name in the results .

There are many such fields with the same name. As well as tables which join-yu.
Therefore it would be desirable that in a name of fields there was a prefix in the form of the name of the table.
For example one.name and two.name .

How to do it automatically?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
Lazy @BojackHorseman MySQL, 2020-10-29
Tag

no way. only explicitly indicate the names of tables or their aliases.
no one and nothing but the author of the request can resolve the resulting ambiguity.

K
Konstantin Tsvetkov, 2020-10-29
@tsklab

Make a request not with the keyboard buttons, but with the mouse in the query designer - it will be there automatically.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question