delete from gust_card
where gust_card.c_id =
(select gust_card.c_id``
from gust_card,booking,room
where
gust_card.c_id=booking.c_id and
booking.room_id=room.room_id
and room.stranded='deluxe ' )
我想删除已预订“豪华”房间的客户的记录。
room table>> room_id , standard
guest_card table>> guest_id, guest name
booking table >> booking_id ,room_id,guest_id
答案 0 :(得分:1)
您必须将等号替换为“IN”,如
-Xms256m -Xmx1024m
因为subselect可以返回多个结果行。使用“in”,可以删除子选择结果列表中包含id的所有行。