1
我已閱讀所有相關的問題,但無法得到這個簡單的事情工作。我想這個串聯查詢的結果:如何連接此結果集?
SELECT DISTINCT ord.uid AS u
FROM `uc_order_products` ord_prod, `uc_orders` ord, `uc_roles_expirations` re
WHERE ord.order_id = ord_prod.order_id
AND ord_prod.title LIKE '2012. évi%'
AND ord.uid NOT
IN (SELECT uid FROM uc_roles_expirations re)
它看起來像這樣:
U
----
1234
1235
...
這是我的嘗試:
SELECT GROUP_CONCAT(DISTINCT ord.uid AS u
FROM `uc_order_products` ord_prod, `uc_orders` ord, `uc_roles_expirations` re
WHERE ord.order_id = ord_prod.order_id
AND ord_prod.title LIKE '2012. évi%'
AND ord.uid NOT
IN (SELECT uid FROM uc_roles_expirations re) SEPARATOR ',')
..和沒有工作。你可以幫幫我嗎?