SQL 三表关联

2024-11-22 00:02:13
推荐回答(1个)
回答1:

比如有三张表,student,teacher , project :

第一种方法:select * from student,teacher,project where student.id=teacher.sid and student.id=project.sid;
第二种:select * from student inner join teacher on student.id=teacher.sid inner join project on student.id=project.sid;