mysql 批量更新数据为随机不同的内容

2019-05-30  本文已影响0人  c608
UPDATE pool_key_customer SET latitude = CASE (SELECT (CEIL(RAND() * 2) + 2)%2) WHEN 0 THEN (SELECT (RAND()*90)) WHEN 1 THEN (SELECT (RAND()*90))  END,
longitude = CASE (SELECT (CEIL(RAND() * 2) + 2)%2) WHEN 0 THEN (SELECT (RAND()*180)) WHEN 1 THEN (SELECT (RAND()*180))  END 
上一篇下一篇

猜你喜欢

热点阅读