Skip to content

Instantly share code, notes, and snippets.

@Kcko
Forked from ethanpil/gist:8675160
Created April 30, 2019 09:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kcko/b368919a7cbfb8b120e4cd9766083044 to your computer and use it in GitHub Desktop.
Save Kcko/b368919a7cbfb8b120e4cd9766083044 to your computer and use it in GitHub Desktop.
Insert A Random String from List in MySQL
UPDATE tablename
SET columnname = ELT(0.5 + RAND() * 6, 'value 1','value 2','value 3','value 4','value 5','value 6')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment