-2
I want to access data from two different tables: ocorrencia and fotos.
- On the table
fotosI have a field that is theid_ocorrencia(which creates the relation - foreign key). - On the table
ocorrenciano foreign table keyfotos.
When I perform this query:
select
nome_foto
from
ocorrencia
inner join fotos
on fotos.id_ocorrencia=ocorrencia.id_ocorrencia
works, but when I run this:
select
Id_ocorrencia, nome_foto
from
ocorrencia
inner join fotos
on fotos.id_ocorrencia=ocorrencia.id_ocorrencia
go wrong
how would Andrey look?
– Menino Hori