SQL 2000 中,查询某个字段的值中第一个字是汉字的语句如何写?SQL code: where left(col,1)a like '[吖-咗]
'[吖-咗] 是什么意思? SQL code: --------------------SQL Server数据格式化工具------------------- --------------------------------------------------------------- -- DESIGNER :happycell188(喜喜) -- QQ :584738179 -- Development Tool :Microsoft Visual C++ 6.0 C Language -- FUNCTION :CONVERT DATA TO T-SQL --------------------------------------------------------------- -- Microsoft SQL Server 2005 -- Developer Edition on Microsoft Windows XP [版本 5.1.2600] --------------------------------------------------------------- ---------------------------------------------------------------
use test go if object_id('test.dbo.tb') is not null drop table tb -- 创建数据表 create table tb ( id int, name char(5) ) go --插入测试数据 insert into tb select 1,'jone' union all select 2,'李四' union all select 3,'Lili' union all select 4,'王五' go
select * from tb where ascii(left(ltrim(name),1))>127 or ascii(right(name,1))<0