I have two tables, Anuidades
and Pagamentos
.
From these annuities it is necessary to select data from Anuidades
that have not yet been paid.
Table Anuidades
TablePagamentos
ToreturntheannuitydatathathadbeenpaidIusedthefollowingquery:
SELECT*FROManuidadesINNERJOINpagamentosONanuidades.Id=pagamentos.idAnuidadeWHEREpagamentos.idMinistro=1
anditreturnedcorrectly:
But when I try to select the annuities that are not registered in the payment table I can not.