34,872
社区成员
发帖
与我相关
我的任务
分享select *
from tbname
where len(字段)>1
and isnumeric(right(字段,len(字段)-1)) = 1
and 字段 like 'A%'select isnumeric(null),isnumeric('') --0,0select * from tbname where cou like '%A[0-9]%'select * from tbname where cou like '%A[0-9]%'也可以试一下declare @t table(col varchar(50))
insert @t select 'A34334'
union all select '33434'
union all select 'A0'
union all select 'BXVXV'
union all select 'AXX'
select *
from @t
where col like 'A%' and isnumeric(right(col,len(col)-1))=1
/*
(所影响的行数为 5 行)
col
--------------------------------------------------
A34334
A0
(所影响的行数为 2 行)
*/