判断手机号码中是否有字母
--号码中有字母ifchar_length(@phone)=11
begin
select @v_num1 = char_length(@phone)
redo_one:
select @v_num3 = convert(int,ascii(substring(@phone,@v_num2,1)))
if @v_num3 > 47 and @v_num3 <58
begin
select @v_num2 = @v_num2+1
while @v_num2<@v_num1+1
goto redo_one
end
else
begin
select @i_type = 8
RETURN 0
end
end
这样写对吗?
页:
[1]