left join 左聯表 where條件查詢時
<if test="status != null and status != ''"> and status = #{status}</if>
沒有聲明是哪一個表,兩表均有status字段
報錯Column 'status' in where clause is ambiguous
解決方案:查詢多張表時給每張表取名,表名.字段來表示
left join 左聯表 where條件查詢時
<if test="status != null and status != ''"> and status = #{status}</if>
沒有聲明是哪一個表,兩表均有status字段
報錯Column 'status' in where clause is ambiguous
解決方案:查詢多張表時給每張表取名,表名.字段來表示
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。