sqlserver 使用函数获取一个字符串的拼音首字母 create function dbo.fn_getpinyin ( @str nvarchar(max) ) returns nvarchar(max) as begin ),@PY nvarchar(max) set @PY='' begin ) --如果非汉字字符,返回原字符 PY from ( select 'A' as PY,N'驁' as word union all select 'B',N'簿' union all sele…