--===============================================
--功能:汉字笔画函数
--说明:以单个汉字汉字为参数返回每一个汉字的笔画数
--作者: J9988 --*/
--===============================================
create function [dbo].[fun_getbh](@char nchar(2))
returns int
as
begin
return(
case when unicode(@char) between 19968 and 40869 then(
select top 1 id from(
select id=1,ch=N'亅' union all select 2,N'阝'
union all select 3,N'马' union

本文介绍了一个SQL函数,用于获取单个汉字的笔画数。该函数通过一个内部定义的字符列表,根据Unicode范围匹配汉字并返回相应的笔画数。提供了一个测试示例,显示了函数对于汉字'晓'的笔画计数结果为10。
最低0.47元/天 解锁文章
1434

被折叠的 条评论
为什么被折叠?



