已知字符,求字符串位置
SELECT charindex('est', 'testing')
-----------
2
(1 row(s) affected)
已知字符位置,求字符串
SELECT SUBSTRING('testing',1,3)
----
tes
(1 row(s) affected)
已知字符,求字符串位置
SELECT charindex('est', 'testing')
-----------
2
(1 row(s) affected)
已知字符位置,求字符串
SELECT SUBSTRING('testing',1,3)
----
tes
(1 row(s) affected)