2009年08月30日

if object_id('tc') is not null
 drop table tc
go

create table tc(id int identity(1,2),name nvarchar(30))

insert into tc
 select 'A01'
 union all select 'Z02'

 union all select 'B02'
 union all select '33'
 union all select '13'
 union all select '18'

--sql ① もしisnumeric() 戻り値 は 1 なら isnumeric  ELSE  not
select * from tc where isnumeric(name)=0

--sql ② [A-Z] 全角、半角は区分しません
select * from tc where name like '[A-Z]%'

--sql ③
select * from tc where name like '[A,B,C]%'

--sql ④
select * from tc where case when isnumeric(name)=0 then 0
       else name
       end >15

你可能感兴趣的:(T_SQL,日本語)