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

查询语句: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;

表格:user

user_cour

cour表格

 

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