2
I have two tables, Anuidades and Pagamentos.
Of these annuities it is necessary to select the data of Anuidades which have not yet been paid.
Table Anuidades
Table Pagamentos
To return the annuities data that had been paid I used the following query:
SELECT *
FROM anuidades
INNER JOIN pagamentos ON anuidades.Id = pagamentos.idAnuidade
WHERE pagamentos.idMinistro = 1
But when I try to select the annuities that have no record in the payments table I cannot.



It didn’t work, it returns empty =/
– Carlos André