0
I have 2 tables in Mysql, INSCRICAO1 and INSCRICAO2. Both have a field called COD that receives a user code.
To INSCRICAO1 stores your personal information To INSCRICAO2 saves user’s car information
I need to select the INSCRICAO1 only of users who own cars, ie that are also present in the table INSCRICAO2.
How to do, I tried with LEFT JOIN, but gave error.
You actually described the behavior of
INNER JOIN
. But with select itself, we can only help if you share your attempt. The way to do it depends on the data model, there is not enough information to give an accurate answer, I am marking as unclear.– Diego Rafael Souza
The answer was this, INNER JOIN, thanks! Anyway I’ll improve the question.
– caiocafardo