摘要: 有两表:Blog,Comment。Comment表中的CommentBlog是Blog表中主键Id的外键。删除Blog表中数据时,要求Comment表中对应Id外间所在的数据同时删除。编写触发器:create trigger BlogDeleton Bloginstead of delete as delete from Comment where CommentBlog in (select Id from deleted) 阅读全文
posted @ 2012-02-19 12:38 哪啊哪啊神去村 阅读(923) 评论(2) 推荐(0) 编辑