此選擇查詢給我我想要修改我想更新表中的多個行,但是如果某個列的值不存在於另一個表中?
Select * From Location
where Location.DeviceAddress not in (Select DeviceAddress From Device) order by DeviceAddress desc
但是列,此更新查詢
Update Location
set DeviceAddress = NULL
where Location.DeviceAddress not in (Select DeviceAddress From Device)
使我有以下錯誤:
子查詢返回多個值。當子查詢遵循=,!=,<,< =,>,> =或當子查詢用作表達式時,這是不允許的。 該聲明已被終止。
僅供參考,我使用的是Microsoft Server 2008和一如既往的支持深表感謝