使用mysql數據庫進行左右連接查詢的時候出現錯誤提示 Column 'id' in where clause is ambiguous。
這個錯誤in where clause is ambiguous多半是因爲多表查詢的時候幾個表中同時出現了某個相同的列名,而在查詢條件WHERE後面又沒有指定是那個表,而引起的。
又或者是查詢結果裏面有兩個相同的列名,而沒有指定是哪個表使用的時候可以這樣,mysql查詢前面加表名可避免出現錯誤
Column 'id' in where clause is ambiguous
Ps:where 條件語句後查詢某個字段要加上表名。