---
title: "删除新闻及对其的评论"
author: "epai"
date: "2010-05-20T10:20:11Z"
tags: []
categories: ["数据库"]
slug: "untitled"
draft: false
lastmod: "2010-05-20T10:20:11Z"
id: 670444
url: "https://epai.iteye.com/blog/670444"
---

USE \[Publishing System ]  
GO  
/\*\*\*\*\** Object:  StoredProcedure \[dbo].\[procnewsdelete]    Script Date: 05/12/2010 12:12:25 \*\*\*\*\*\*/  
SET ANSI\_NULLS ON  
GO  
SET QUOTED\_IDENTIFIER ON  
GO  
\-- =============================================  
\-- Author:  韩慧  
\-- Create date: 2010-4-15 2：11  
\-- Description: 删除新闻  
\-- =============================================  
ALTER PROCEDURE \[dbo].\[procnewsdelete]  
 @id int  
AS  
BEGIN  
 --需要先删除评论才能删除新闻  
 delete comment where [newsid=@id](mailto:newsid=@id)  
 --删除新闻  
 delete news where [id=@id](mailto:id=@id)  
END