php – 如何在sql中生成随机字符串到salt passowrd?

php – 如何在sql中生成随机字符串到salt passowrd?

在sql中有关于密码的问题:下面的代码通过随机生成10个字符的字符串来限制特定密码:Update Teacher SET TeacherSalt = SUBSTRING(MD5(RAND()), -10), TeacherPassword = SHA1(CONCAT(009b9b624aaecc4b3217dcd4bfee15ab7