存储过程在as后面declare是什么意思?
随便找了一个存储,学习一下
create proc getgzsecid @nextid char(8) output
as
declare @tmpd int
select @tmpd=isnull(max
(convert(int,substring(func_code,7,2))),0)+1
from funcframe where func_parent='010103'
if @tmpd<10 select @nextid='010103'+'0'+convert (char(1),@tmpd)
else select @nextid='010103'+convert(char(2),@tmpd)
GO
在as后面declare是什么意思?