這裏是我的代碼:#1052 - 在列「課程」 where子句是曖昧
SELECT all_university.*,
all_colleges.*
FROM all_university
INNER JOIN all_colleges ON all_colleges.stateid = all_university.stateid
WHERE courses LIKE '%BTech%'
在這裏,我想從all_university
和all_colleges
其中stateid
是常見的兩個表,但是當我運行查詢時,所有數據條件拋出
#1052 - Column 'courses' in where clause is ambiguous. How can I remove this.
謝謝
是的,兩個表上都有課程。 –
使用別名來區分。 'all_colleges.courses' –
使用通用名稱字段的別名 –