存储过程 递归删除
create proc [up_delete_nclass]
@did int
as
with my1 as(select * from NewsClass where id = @did
union all select NewsClass.* from my1, NewsClass where my1.id = NewsClass.parentID
)
delete from NewsClass where exists (select id from my1 where my1.id = NewsClass.id)