有兩個表ps_customer和ps_address。選擇無地址的客戶
ps_customer contains: id_customer and customer.email
ps_address contains: id_customer and few other fields.
我想選擇數據不在ps_address表中的客戶。 我使用SQL查詢:
SELECT id_customer, customer.email FROM ps_customer
WHERE id_customer NOT IN SELECT id_customer FROM ps_address;
但它拋出,有什麼不對的查詢SELECT id_customer FROM ps_address