两张表时:
select * from (
select a.a1,b.b1 from a ,b )子查询
select * from (
select a.a1,b.b1 from a ,b where a.id=b.id)
链接查询
三张表时:
比如有三张表,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;