Created
January 28, 2014 20:01
-
-
Save ethanpil/8675160 to your computer and use it in GitHub Desktop.
Insert A Random String from List in MySQL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
useful for generating test data