22,209
社区成员
发帖
与我相关
我的任务
分享
select count(*) from user_Work_Enroll a LEFT JOIN user_Login b on a.cusername=b.cusername where b.sUnitID='4101000000000000'
select SUM(1)from user_Work_Enroll a
LEFT JOIN user_Login b on a.cusername=b.cusername
where b.sUnitID='4101000000000000'
--或者
select COUNT(a.主键)from user_Work_Enroll a
LEFT JOIN user_Login b on a.cusername=b.cusername
where b.sUnitID='4101000000000000'
--然后看下,能不能用主键的字段来做表连接的字段
--如果不行,给cusername加个索引试下