我是 SQL Server 的新手,并试图编写一个存储过程,在调用存储过程时使用当前日期/时间更新记录集。我的代码在=
. 该参数@SentFax
是需要更新的记录的PK,任何想法为什么这不起作用?
CREATE PROCEDURE FaxMailerSent
-- Add the parameters for the stored procedure here
@SentFax int = 0,
=
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Insert statements for procedure here
UPDATE FaxMailer
SET Done = GetDate()
WHERE [Fax_ID] = @SentFax;
END
GO