ALTER PROCEDURE [dbo].[News_Update_is]
-- Add the parameters for the stored procedure here
@Newsid bigint,
@col nvarchar(50)
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
exec(‘update newsclass set ‘+@col+‘=-‘+@col+‘ where NewsClassid=‘+@Newsid)
END
原文地址:http://zhaoyingyatou.blog.51cto.com/7151735/1595800