有时候我们简化了left join 或right join 也可以实现多表查询
- < select id="getSubjectClassifyNews" resultMap="BaseResultMapCheckAdvice" parameterType="com.cnten.pbPreach.subjectclassify.model.SubjectClassify">
- select ca.* from pb_check_advice ca,pb_subject_classify sc,pb_classify_rel_advice cra
- where ca.check_advice_id=cra.advice_id and sc.subjectclassify_id=cra.subject_classify_id
- and sc.subjectclassify_id=#{subjectClassifyId,jdbcType=VARCHAR }
- and ca.check_column_id = ‘9592af517aea4af9ae2feb1434de019f‘
- </ select>
www.hanbotec.com
来源瀚博图像转载请注明