0
我想從以下SELECT查詢刪除導致的行刪除從選擇在MySQL
select customer_ID, order_ID, t1, t2
from web_order, items_table as a, items_table as b
where (web_order.t1 = a.item_name and a.quantity)
and (web_order.t2 = b.item_name and b.quantity)
and ((a.quantity < b.quantity));
這是我的DELETE查詢
delete from web_order where customer_ID in
(select customer_ID, order_ID, t1, t2
from web_order, items_table as a, items_table as b
where (web_order.t1 = a.item_name and a.quantity)
and (web_order.t2 = b.item_name and b.quantity)
and ((a.quantity < b.quantity)));
但我得到這個錯誤
ERROR 1241 (21000): Operand should contain 1 column(s)
你想擺脫行的其中'customer_ID' - 一列--'is in'包含四列的查詢。不要這樣做。 – 2017-02-03 20:22:32