Reputation: 10913
How do I get to make this sqsl query work:
SELECT student.LASTNAME,
student.FIRSTNAME,
student.IDNO,
student.YEAR,
parents.P_ADDRESS
FROM student
WHERE P_ADDRESS="Ambagat, Santol, LU"
RIGHT JOIN parents ON student.IDNO = parents.IDNO
I just want to add where statement on the joins. Because the usual example in w3schools doesn't include a where statement. Please help.
Upvotes: 0
Views: 85
Reputation: 166486
Like this
SELECT student.LASTNAME,
student.FIRSTNAME,
student.IDNO,
student.YEAR,
parents.P_ADDRESS
FROM student RIGHT JOIN parents ON student.IDNO=parents.IDNO
AND P_ADDRESS="Ambagat, Santol, LU"
Upvotes: 3