发布网友 发布时间:2022-04-22 00:14
共1个回答
热心网友 时间:2022-04-07 22:10
这个例子你看看吧
begin
declare num int;
select count(*)into num from newsinfo where NewsID=id;
if(num=1)then
delete from newspictureinfo where NewsID=id;
delete from newsvideoinfo where NewsID=id;
delete from newscommentinfo where NewsID=id;
delete from newsinfo where NewsID=id;
end;