I have two tables:
Tabela1 Tabela2
+------+----------+--------+ +------+----------+------------+
| id | idCidade | bairro | | id | idBairro | logradouro |
+------+----------+--------+ +------+----------+------------+
| 6091 | 15890 | Vila A | | 05 | 6091 | Av. Brasil |
| 5089 | 17500 | Vila A | | 08 | 1000 | Av. Brasil |
+------+----------+--------+ +------+----------+------------+
The user will inform the 'public place', 'idCidade'. I need to know what is the neighborhood of a certain place in a certain city. With the name of the 'backyard' I look in Table 2, in the example above it returns me to the existence of two places with that name in districts. But I also do a search in Table 1, I look for the 'id' of all neighborhoods of a certain city. If for example I inform you that (idCidade = 17500) and (backradouro = Av Brasil), the neighborhood of this street would be 'Vila A' of id = 5089. What would be the query you would use for this?