标签:mybatis teacher each for form 嵌套 学生 sel bsp
//查询出某个班级对应的所有老师和学生
1、使用嵌套结果
select * from classes c,teacher t,student s where c.teacher_id = t.t_id and c.c_id = s.class_id where c_id = #{id}
2、使用嵌套查询
select * from classes where c_id = #{id};
select * form teacher where t_id = #{id}
select * from student where class_id = #{id}
标签:mybatis teacher each for form 嵌套 学生 sel bsp
原文地址:http://www.cnblogs.com/hy87/p/6216535.html