0

I've added a 'join_key' column into my 'providers' table as an update.

I need to fill the 'join_key' for all existing providers with random numbers/letters 10 characters in length.

Can anyone help me with the query to do it? The column is currently NULL.

I've tried this:

UPDATE `providers` SET `join_key` = 1000 * RAND() WHERE 1; 

but i keep getting a decimal point: 19.714112411918226

Paolo Resteghini
  • 312
  • 1
  • 2
  • 13
  • StackOverflow is not a free coding service. SO expects you to [try to solve your own problem first](https://meta.stackoverflow.com/questions/261592). Please update your question to show what you have already tried in a [mcve]. For further information, please see [ask], and take the [tour] :) – Barmar Dec 06 '18 at 17:41
  • Try `MD5(RAND())` to get random strings. – Barmar Dec 06 '18 at 17:42
  • See also [this search](https://stackoverflow.com/search?q=%5Bmysql%5D+random+string+-%5Bphp%5D) – Barmar Dec 06 '18 at 17:43

0 Answers0