我需要在 TSQL 中创建一个新密码,该密码必须为 8 个字符 (a-z),其中必须包括大写和小写字符以及至少一个数字.
I need to create a new password in TSQL which needs to be 8 characters (a-z) which have to include upper and lower characters as well as at least one number.
谁能帮我解决这个问题?
Can anyone help me with this?
select cast((Abs(Checksum(NewId()))%10) as varchar(1)) +
char(ascii('a')+(Abs(Checksum(NewId()))%25)) +
char(ascii('A')+(Abs(Checksum(NewId()))%25)) +
left(newid(),5)
from yourTable
这篇关于Sql 密码生成器 - 8 个字符,上下并包括一个数字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!