SQLserver 一個簡單的循環插入數據的存儲過程

create procedure pro9
as 
declare @ID int
set @ID =5
while(@ID<10)
begin
insert into Student_information values(@ID,'lili','男')
set @ID=@ID+1
end 
GO

exec pro9   

drop procedure pro9

 
相關文章
相關標籤/搜索