select name 姓名,favorite 爱好,totalScore 总成绩 form student s,appendix a,courses c 如果只是这样的话,不会得到你想要的信息的。 还得加上where子句 如果都是以studentID相关联的话,后面加上一句: where s.studentid=a.studentid and a.studentid=c.studentid
不明白意思 select a.id,b.name from A a,B b where(a.id=b.id)?
SELECT 别名A.字段,别名B.字段 FROM A 别名A,B 别名B WHERE 别名A.外键 = 别名B.主键ep: SELECT user.name,dept.salary FROM tbUser user, tbDept dept WHERE user.deptID = dept.ID
如果只是这样的话,不会得到你想要的信息的。
还得加上where子句
如果都是以studentID相关联的话,后面加上一句:
where s.studentid=a.studentid and a.studentid=c.studentid
select a.id,b.name from A a,B b where(a.id=b.id)?
别名A.字段,别名B.字段
FROM
A 别名A,B 别名B
WHERE
别名A.外键 = 别名B.主键ep:
SELECT
user.name,dept.salary
FROM
tbUser user, tbDept dept
WHERE
user.deptID = dept.ID