两张表通过中间表建立联系的查询语句

user表格

user—cour表格关联表

cour表格

查询语句:select  * from  courseware c left join user_cour uc on  c.cid = uc.cid left join `user` u  on uc.uid = u.uid where u.uid=1;

posted @ 2016-09-12 10:10  新月勾魂  阅读(11528)  评论(3编辑  收藏  举报