I have the following scheme:
tblpessoa with the fields: idPerson, name.
tag with the fields: idCity, codCity, name, idPerformance (fk of the tblpessoa table), codeRegionCity (fk of the tblregiaoCity table).
tblregiaoCity with the fields: codeRegionCity, name.
Then I want to bring the person's name, code, and the Code of Citizenship (fk from the table). And I make the following query, but it does not return anything.
SELECT c.codCidade,
p.nome,
c.codigoRegiaoCidade
FROM tblcidade c,
tblpessoa p
WHERE c.ID_PESSOA = p.ID_PESSOA
AND c.codCidade = 23
AND c.codigoRegiaoCidade = 89 ;
Does anyone know where the problem is?