怎样用SQL语句批量生成测试数据
1个回答
展开全部
insert into BlockTable(BlockNo,BinNo,Rack,ChipCount,MachineNo)
select cast((rand()*130) as int),cast((rand()*10) as int),cast((rand()*130) as int),0,'001'
from master..spt_values
where [type] = 'p' and number <= 130
select cast((rand()*130) as int),cast((rand()*10) as int),cast((rand()*130) as int),0,'001'
from master..spt_values
where [type] = 'p' and number <= 130
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询