【发布时间】:2014-03-21 17:57:10
【问题描述】:
一个非常基本的问题,我有一个更新我想做的更新,然后它会影响 2000 多行但是当我只是在子查询中执行选择查询时,我得到 1726 行。我知道我的更新声明有问题,有人可以帮忙吗?
update ship_plu
set pluc_dt='1-Jan-1999'
where pluc_dt in (
select sp.pluc_dt
from ship_plu sp,ship s
where sp.pluc_dt between '16-Feb-2014' and '20-Feb-2014'
and sp.ship_num=s.ship_num
and s.rcv_dt is null
)
所以上面执行的子查询只带回 1726 行,但是当我执行整个更新查询时,它会影响超过 2000 行,我只想做 1726?
【问题讨论】: