Skip to content

Instantly share code, notes, and snippets.

@ethanpil
Created January 28, 2014 20:01
Show Gist options
  • Save ethanpil/8675160 to your computer and use it in GitHub Desktop.
Save ethanpil/8675160 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')
@ethanpil
Copy link
Author

useful for generating test data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment