语句如下
update tablename t set colname=(select colname
from tablename2 t2
where t.colname1=t2.colname1 and.....)
where t.colname='0001"
数据量不是很大就五六百条,但是更新速度非常慢,请高手指点。
update tablename t set colname=(select colname
from tablename2 t2
where t.colname1=t2.colname1 and.....)
where t.colname='0001"
数据量不是很大就五六百条,但是更新速度非常慢,请高手指点。
如果不加最后一个where,1万条才需要30秒左右,为什么???
update语句:
update tablename t set colname =
nvl((select colname from tablename2 t2
where t.colname1=t2.colname1 and..... and rownum = 1
),t.colname
)
where t.colname='0001"