I have a small problem when trying to extract all the data of a weak entity that I have created between a table called Doctor and another patient. When I do the query, I extract the data correctly but in triplicate, that is, instead of returning the information of:
Juan
Maria
Pedro
The query returns me:
Juan
Juan
Juan
Maria
Maria
Maria ...
This is the last attempt I've made so far.
SELECT * FROM Doctor_Account INNER JOIN Doctor_Patient_Connection ON Doctor_Patient_Connection.PatientAccount_ID=2;
With my query, what I want to return is, all the data of each of the doctors that are linked to the patient.