I have two tables in my DB (mysql), where:
1st Table: CADASTROS
With the following fields: ID, NOME, IDADE, CIDADE
2nd Table: FUNCIONARIO
With the following fields: ID, ID_CADASTRO, PROFISSAO, SALARIO
Running a query on the CADASTROS
table by ordering NOME
:
SELECT * FROM CADASTROS ORDER BY NOME ASC
How do I perform a search that returns only the existing records in the CADASTROS
table that does not match the FUNCIONARIO
? table