Skip to content
Advertisement

Consider two left join with same table SQL

I have this query

I need to consider procedimentos when faturamento_lancamentos_bpa_adicionais.procedimento_id and faturamento_lancamentos_bpa.procedimento_id

Advertisement

Answer

You need to alias the “doubled” tables, as every entity needs a unique name

The use of meaningful aliases will keep also the query better readable

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement