首页 > 代码库 > sql每五秒插入一条数据

sql每五秒插入一条数据

 1 declare @dt datetime,@today datetime,@a varchar(max),@z datetime set @a=0 2 select @today=CONVERT(varchar(100), GETDATE(), 20),@dt=@today 3 while @a<1 4 begin 5 select @today=CONVERT(varchar(100), GETDATE(), 20) 6  7    while @dt=@today 8    begin 9    insert projectManage values(装机bb+@a,小明,大明,工程监理,,@dt,2000-9-9,13527748096,13527748096,13527748096,13527748096,13527748096,13527748096)10     set @dt=DATEADD(SECOND,5,@dt)11    end12 set @a=@a-113 end

 

sql每五秒插入一条数据