You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
比如:
sqlStr1 = "left join tableb b on a.id=b.id";
sqlStr2 = "left join tableb c on a.id=c.id";
select * from tablea a
${sqlStr1}
${sqlStr2}
where 1=1 ......
MyBatis中,${}可以把硬编码的字符串SQL语句当参数使用拼接到XML里sql语句里执行
比如:
sqlStr1 = "left join tableb b on a.id=b.id";
sqlStr2 = "left join tableb c on a.id=c.id";
select * from tablea a
${sqlStr1}
${sqlStr2}
where 1=1 ......