delete和exists一起用的问题,求达人!
select * from zjolsms_ig..tb_smsdeliver c where exists(select p_number from zjolsms_ig..tb_programinfo a,zjolsms_ig..tb_userinfo b where a.c_id=b.u_relationid and b.u_loginname='czgd105' and b.u_level=2 and a.p_number=c.p_number)delete from zjolsms_ig..tb_smsdeliver c where exists (select p_number from zjolsms_ig..tb_programinfo a,zjolsms_ig..tb_userinfo b where a.p_number=c.p_number and a.c_id=b.u_relationid and b.u_loginname='bbgd104' and b.u_level=2)