存储过程如下:
if exists(select name from sysobjects where name='DeleteGroupHd' and type='P' )
drop proc DeleteGroupHd
go
Create Proc DeleteGroupHd @CGN varchar(5)
as
delete from MaItemHd where CategoryNo in (select CategoryNo from MaCategoryHd where CategoryGroupNo=@CGN)
delete from MaCategoryHd where CategoryGroupNo=@CGN
delete from MaCategoryGroupHd where CategoryGroupNo=@CGN
go