所以我試圖列出每個客戶的數量和名稱,或者由銷售代表65或目前有文件訂單,或兩者,並且我不斷收到錯誤。我甚至在書中檢查瞭解決方案,我的代碼看起來是一樣的。這個錯誤告訴我什麼?我附上了本書給出的解決方案。 Solution我無法找到我的SQL代碼中的錯誤?
mysql> SELECT CUSTOMER_NUM, CUSTOMER_NAME
-> FROM CUSTOMER
-> WHERE REP_NUM+'65'
-> UNION
-> SELECT C.CUSTOMER_NUM, CUSTOMER_NAME
-> FROM CUSTOMER C, ORDERS 0
-> WHERE C.CUSTOMER_NUM=0.CUSTOMER_NUM;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '0
WHERE C.CUSTOMER_NUM=0.CUSTOMER_NUM' at line 6
在未來,*請*告訴我們錯誤說* *什麼。 – ceejayoz
它是根據代碼 – Steberz