sql 批量更新表中多字段为不同的值

 1 select convert(decimal(18,2),rand()), convert(decimal(18,2),rand())
 2 
 3 select newid()
 4  
 5 SELECT substring(LTrim(abs(checksum(newid()))),0,5)
 6 
 7 update tablename 
 8 set  FA=100,
 9 FB=ROUND(RAND(substring(LTrim(abs(checksum(newid()))),0,6)) * 50, 0),
10 FC=ROUND(RAND(substring(LTrim(abs(checksum(newid()))),0,6)) * 50, 0)

 

posted @ 2016-06-05 08:17  自然去留  阅读(1067)  评论(0编辑  收藏  举报