存储过程如何向一张表中循环插入1000条数据和字段二进制转换

declare @tb table(id int identity(0,1),date datetime) declare @count int,@i float set @count=0 while(@count <=1000)   begin     insert into @tb values(dateadd(ms,@count,'00:00:00.000'))     set @count=@count+1       end select id,date ,cast(date as binary(8)) as [binary] ,cast(cast(date as binary(8)) as int) as [int]from @tb

你可能感兴趣的:(技术实践)