This Query Works:
SELECT physician.fname,physician.mname,physician.lname,physician.title,physician.id,physician.newpatients from physician,physicianspecialty WHERE physician.lname LIKE '%%' and physician.id = physicianspecialty.physicianid and physicianspecialty.specialtyid = 80
This Query Doesn't Work:
SELECT physician.fname,physician.mname,physician.lname,physician.title,physician.id,physician.newpatients from physician,physicianspecialty WHERE physician.lname LIKE '%%' and physician.id = physicianspecialty.physicianid and physicianspecialty.specialtyid = 12 OR physicianspecialty.specialtyid = 79 OR physicianspecialty.specialtyid = 80 OR physicianspecialty.specialtyid = 81
The first one doesn't have an OR statement in it and the second one does. Am I able to use or statements in an join query? If so, how should i fix my query?