您的位置:首页 > 其它

存储过程正确返回受影响的行数

2009-07-16 09:31 288 查看
set ANSI_NULLS ON

set QUOTED_IDENTIFIER ON

go

-- =============================================

-- Author: <Author,,Name>

-- Create date: <Create Date,,>

-- Description: <Description,,>

-- =============================================

ALTER PROCEDURE [dbo].[ProcAddNews] /*添加新闻*/

-- Add the parameters for the stored procedure here

@NewsTitle varchar(200),@NewsContent text,@TypeId int

AS

BEGIN

--SET NOCOUNT ON;

-- Insert statements for procedure here

insert into TNews(NewsTitle,NewsContent,TypeId)

values

(

@NewsTitle,

@NewsContent,

@TypeId

)

END

如果设置:SET NOCOUNT ON;

则存储过程不返回受影响的行数
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: