日期:2014-05-17 浏览次数:21669 次
--判斷全為雙字節就可以了
with t(col) as(
select '大家好' from dual
union all select '大家好!' from dual
)
select col from t where length(col)*2=lengthb(col);
with t(col) as(
select '大家好' from dual
union all select '大家好!' from dual
union all select '大家好‘' from dual
)
select col from t where length(col)*2=lengthb(col)
and regexp_like(col,'^[^[:punct:]]*$');
/*
COL
--------
大家好
*/