update un u
set u.reserve = 0, u.cnt = u.cnt + u.share,u.modified=sysdate
where exists ( select 'X'
from tb t, un u
where t.type_id = 21
and t.order_id = u.united_id
and t.status = 8 );
set u.reserve = 0, u.cnt = u.cnt + u.share,u.modified=sysdate
where exists ( select 'X'
from tb t, un u
where t.type_id = 21
and t.order_id = u.united_id
and t.status = 8 );