AI写作智能体 自主规划任务,支持联网查询和网页读取,多模态高效创作各类分析报告、商业计划、营销方案、教学内容等。 广告
三张表,需要得到的数据是标红色部分的。sql如下: select a.uid,a.uname,a.upsw,a.urealname,a.utel,a.uremark, b.rid,b.rname,b.rremark,c.deptid,c.deptname,c.deptremark from table1 a,table2 b,table3 c where a.sems\_role\_rid=b.rid and a.udeptid=c.deptid  或者: select a.uid,a.uname,a.upsw,a.urealname,a.utel,a.uremark, b.rid,b.rname,b.rremark,c.deptid,c.deptname,c.deptremark from table1 a left join table2 b on  a.sems\_role\_rid=b.rid left join table3 c on a.udeptid=c.deptid  LEFT JOIN 可以实现统一数据库多表联合查询符合条件的数据。