急!关于触发器级联删除的问题 我是根据牛腩的新闻系统视频来写的这个
ALTER TRIGGER [trigCategoryDelete]
ON [dbo].[category]
instead of delete
AS
BEGIN
declare @caid int
select @caid=id from deleted
---删除评论
delete comment where NewsId =(select NewsId from news where CaId=@caid)
--删除新闻
delete news where CaId=@caid
---删除类别
delete category where id=@caid
END