Oracle 多表合并查询

有时候我们简化了left join 或right join 也可以实现多表查询

  1.   < select id="getSubjectClassifyNews" resultMap="BaseResultMapCheckAdvice" parameterType="com.cnten.pbPreach.subjectclassify.model.SubjectClassify">
  2.   select ca.* from pb_check_advice ca,pb_subject_classify sc,pb_classify_rel_advice cra
  3.   where ca.check_advice_id=cra.advice_id and sc.subjectclassify_id=cra.subject_classify_id
  4.   and sc.subjectclassify_id=#{subjectClassifyId,jdbcType=VARCHAR }
  5.   and ca.check_column_id = ‘9592af517aea4af9ae2feb1434de019f‘
  6.   </ select>

 

www.hanbotec.com
来源瀚博图像转载请注明

相关文章