关于SQL 更新stored procedure存储过程
ALTER PROCEDURE proc_name
@Value Varchar(10)
AS
DECLARE @TempValue AS Varchar(10)
DECLARE @TempTable AS Table (Number Varchar(20))
BEGIN
SET @TempValue = @Value + CAST((YEAR(GETDATE( ))+1) AS Char(4))
INSERT INTO @TempTable (Number) VALUES (@TempValue)
SELECT * FROM @TempTable
END
-- 原来的存储过程是取当前年份来做处理的,所以year(getdate)+1就是2012了