B
B
bgood2021-05-25 21:13:16
SQL
bgood, 2021-05-25 21:13:16

Why does LEFT JOIN duplicate columns?

in general, after using LEFT JOIN, I have duplicate columns

select *,
dic_type.name
from sap_ziw
left join dic_type on dic_type.Id = sap_ziw.type_id

screen in attachment
60ad3df5141ac701598791.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
H
HemulGM, 2021-05-25
@bgood

* - selects all fields and all tables, including those in join. You need to usesap_ziw.*, dic_type.name

R
Rsa97, 2021-05-25
@Rsa97

So you yourself wrote "select all columns (*) and additionally the column dic_type.name".

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question