欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

ORACLE删除锁死教程

程序员文章站 2022-05-03 18:00:00
delete from tmp_mzrbb_czyxmtj1; insert into tmp_mzrbb_czyxmtj1(sfxmflmc,sfbz,je,wssdm,pxxh,xmfl) se...

delete from tmp_mzrbb_czyxmtj1;

insert into tmp_mzrbb_czyxmtj1(sfxmflmc,sfbz,je,wssdm,pxxh,xmfl)

select b.sfxmflmc

,a.sfbz

,sum(b.je) as je

,b.wssdm

,0 as pxxh

,(select dmz from sys1_code d where d.fldm='1920' and d.xmdm=c.xmlbdm) as xmfl

from mz_sfzb a,mz_sfmx b,uv_base_xmxxk c

where a.id=b.zb_id

-- and a.czrybm=parm_czydm

and a.wssdm=b.wssdm

and a.wssdm=c.wssdm

and b.itemclass =c.xmlbdm

and b.itemcode=c.ypdm

--and isnull(a.cfysid,'') <> ''

group by b.sfxmflmc,b.wssdm,a.sfbz,c.xmlbdm;

alter system kill session '286, 2184'