CUSTOMER ( Cid, CName, City, Discount )
AGENT ( Aid, AName, City, Percent )
PRODUCT ( Pid, PName, City, Quantity, Price )
ORDERS ( OrderNo, Month, Cid, Aid, Pid, OrderedQuantity, Cost )
Q- 删除居住在纽约市的代理商发出的所有订单。
答案 0 :(得分:-1)
您可以使用in
运算符:
DELETE
FROM orders
WHERE aid IN (SELECT aid
FROM agent
WHERE city = 'New York')