Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何使用 T-SQL 找到字符串中第一个数字字符的索引?
我使用PATINDEX:
PATINDEX
select patindex('%[0-9]%', 'My1String')
select PATINDEX('%[0-9]%', 'your_12345_string')
请参阅文档 SQLFiddle