如何让这个SQL查询工作:
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
我只想在关节上添加where语句。因为w3schools中的常见示例不包含where语句。请帮忙。
答案 0 :(得分:3)
喜欢这个
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"