可以用这个sql:select * from bm_a003 a where length (mc) <> lengthb (mc);
但是lengthb对于中文格式的标点符号区分不出来,可稍加处理如下函数:
create or replace function get_chinese(v_name in varchar2) return integer is
i int;
v_count integer;
v_code varchar2(10);
begin
v_count := 0;
for i in 1 .. lengthb(asciistr(v_name)) - 4 loop
--if substr(asciistr(v_name),i,1)='\' then --有\则判断是否汉字
v_code := substr(asciistr(v_name), i, 5);
IF V_CODE BETWEEN '\4E00' AND '\9FA5' THEN
--汉字的asciid码值范围
v_count := v_count + 1; --有一个汉字
end if;
-- dbms_output.put_line(v_code);
-- end if;
end loop;
return v_count;
exception
when others then
return - 1; --异常返回-1
end get_chinese;