<![CDATA[select t1.* from (SELECT t1.CATEGORY_ID, t1.PARTNER_ID FROM res_partner_res_partner_category_rel t1 ) t1 where id=#{id}]]>
<![CDATA[select t1.* from (SELECT t1.CATEGORY_ID, t11.NAME AS CATEGORY_NAME, t1.PARTNER_ID, t21.NAME AS PARTNER_NAME FROM res_partner_res_partner_category_rel t1 LEFT JOIN RES_PARTNER_CATEGORY t11 ON t1.CATEGORY_ID = t11.ID LEFT JOIN RES_PARTNER t21 ON t1.PARTNER_ID = t21.ID ) t1 where id=#{id}]]>
<![CDATA[ SELECT t1.CATEGORY_ID, t1.PARTNER_ID FROM res_partner_res_partner_category_rel t1
<![CDATA[ SELECT t1.CATEGORY_ID, t11.NAME AS CATEGORY_NAME, t1.PARTNER_ID, t21.NAME AS PARTNER_NAME FROM res_partner_res_partner_category_rel t1 LEFT JOIN RES_PARTNER_CATEGORY t11 ON t1.CATEGORY_ID = t11.ID LEFT JOIN RES_PARTNER t21 ON t1.PARTNER_ID = t21.ID
]]>
</sql>
<!--数据查询[View]-->
<sqlid="View"databaseId="postgresql">
<![CDATA[ SELECT t1.CATEGORY_ID, t1.PARTNER_ID FROM res_partner_res_partner_category_rel t1
<![CDATA[ SELECT t1.CATEGORY_ID, t11.NAME AS CATEGORY_NAME, t1.PARTNER_ID, t21.NAME AS PARTNER_NAME FROM res_partner_res_partner_category_rel t1 LEFT JOIN RES_PARTNER_CATEGORY t11 ON t1.CATEGORY_ID = t11.ID LEFT JOIN RES_PARTNER t21 ON t1.PARTNER_ID = t21.ID