Automatically increase the specified number of years in the oa database

declare @i char
set @i=1
while(@i<=10)--增加年数
begin
insert into  Workflow_FieldYear (yearId,yearName,yeardesc) values (
isnull((select MAX(yearId) from  Workflow_FieldYear)+1,1),
isnull((select MAX(yearName) from  Workflow_FieldYear)+1,1),'')
set @i=@i+1
end

Please leave a message in the comment area and discuss together~~~

If necessary, please contact WeChat: hdygzh2019 At the same time, please explain your intention and make progress together! ! !

Guess you like

Origin blog.csdn.net/Y_6155/article/details/109017877