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

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 

你可能感兴趣的:(mysql 批量更新数据为随机不同的内容)