Home > Database > Mysql Tutorial > SqlServer 判断字符是否汉字或数字方法

SqlServer 判断字符是否汉字或数字方法

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 15:52:17
Original
1917 people have browsed it

SELECT * FROM Flydove_Class_2 WHERE (PATINDEX('%[吖-做]%', Typename) == 0) //判断汉字 SELECT * FROM Flydove_Class_2 WHERE (ISNUMERIC(Typename) == 0) //判断数字 判断字符窗中汉字个数方法(不靠谱) declare @sql varchar(1000) set @sql='abc国m,

SELECT *
FROM Flydove_Class_2
WHERE (PATINDEX('%[吖-做]%', Typename) == 0) //判断汉字

SELECT *
FROM Flydove_Class_2
WHERE (ISNUMERIC(Typename) == 0) //判断数字

 

判断字符窗中汉字个数方法(不靠谱)

declare @sql varchar(1000)
set @sql='abc国m,de中d国e人民f'
select @sql 字符,DATALENGTH(@sql)-len(@sql) 汉字个数

 

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
Problem with tp6 connecting to sqlserver database
From 1970-01-01 08:00:00
0
0
0
Unable to connect to SQL Server in Laravel
From 1970-01-01 08:00:00
0
0
0
Methods of parsing MYD, MYI, and FRM files
From 1970-01-01 08:00:00
0
0
0
SQLSTATE: User login failed
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template