This article mainly introduces the method of generating random numbers and connecting strings in MySQL, briefly analyzes the related functions, and gives the corresponding SQL statement implementation method in the form of examples. Friends who need it can refer to it. I hope it can help everyone. .
Methods used:
concat('a','b','c');
Connection string
rand();
Generate random numbers
##floor();Get integers
UPDATE user set reg_ip= concat(floor(RAND() * 250),'.',floor(RAND() * 250),'.',floor(RAND() * 250),'.',floor(RAND() * 250)) where username='xxx'
php rand() function for random number generation
php five ways to generate random numbers without repeating
JavaScript implementation of random number deduplication generator example
The above is the detailed content of How to generate random numbers and concatenate strings in MySQL. For more information, please follow other related articles on the PHP Chinese website!