我有两个表,订单和客户,我正在尝试返回没有订单的客户ID和客户名称。
customers
customerID: integer
name: string
orders
orderID: integer
itemID: integer
customerID: integer
date: date
我目前所拥有的不会返回任何结果:
SELECT customers.customerID, customers.fName, orders.date
FROM orders INNER JOIN customers
ON orders.customerID = customers.customerID
GROUP BY orders.customerID
HAVING COUNT(*) = 0
答案 0 :(得分:1)
您需要selectedFile.isFile()
来完成此任务:
LEFT OUTER JOIN