-3
I have the following tables:
- client : id_client, name, surname, birth date
- house : id_casa, house, fk_cliente, fk_bairro
- car : id_car, model, fk_customer
- neighborhood: id_bairro, name
I want to perform a query on these tables where I consult all customer data, color of their homes, name of neighborhoods and their homes.
What I tried to:
select `id_cliente`, `nome` as `nome_cliente`, `sobrenome`, `data_nascimento`, `cor` as `cor_da_casa`, `nome` as `nome_bairro` from `cliente`, `casa`, `bairro`;
The mistake I’m getting:
ERROR 1052 (23000): Column 'nome' in field list is ambiguous
Required reading: https://answall.com/questions/6441/qual-%C3%A9-a-difference%C3%A7a-entre-Inner-Join-e-outer-Join
– novic
Other reading: https://stackoverflow.com/questions/12364602/mysql-inner-join-with-where-clause
– novic
Other: https://answall.com/questions/149407/diferen%C3%a7a-entre-right-Join-e-left-Join? noredirect=1&lq=1
– novic