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

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;

原文地址:https://www.cnblogs.com/swp520lmg/p/5863798.html