Oracle PLSQL Demo - 22.查看字符串的长度[lengthb, length],判断字符串是否包含中文
--Count the length of string
select lengthb('select * from scott.emp') as countted_by_byte, length('select * from scott.emp') as countted_by_char from dual; --For some character encoding, the length() and the lengthb() is same in english
--you may use this feature to check whether the string constains the chinese char
declare
v_char varchar2(50) := 'hello world你好';
begin if lengthb(v_char) = length(v_char) then
dbms_output.put_line('it have not chinese...');
else
dbms_output.put_line('it have chinese...');
end if; end;
Oracle PLSQL Demo - 22.查看字符串的长度[lengthb, length],判断字符串是否包含中文的更多相关文章
- 灵魂拷问:Java如何获取数组和字符串的长度?length还是length()?
限时 1 秒钟给出答案,来来来,听我口令:"Java 如何获取数组和字符串的长度?length 还是 length()?" 在逛 programcreek 的时候,我发现了上面这个 ...
- c# 判断字符是否是全角, 获取字符串的字节数 , 获取字符串指定长度字节数的字符串
1 Encoding.Default.GetByteCount(checkString); =2 全角 =1 半角 /// <summary> /// 获取字符串的字节长度 /// &l ...
- php查找字符串首次出现的位置 判断字符串是否在另一个字符串中
strpos - 查找字符串首次出现的位置 说明 int strpos ( string $haystack , mixed $needle [, int $offset = 0 ] ) 返回 nee ...
- Oracle PLSQL Demo - 24.分隔字符串function
-- refer: -- http://www.cnblogs.com/gnielee/archive/2009/09/09/1563154.html -- http://www.cnblogs.co ...
- Oracle PLSQL Demo - 31.执行动态SQL拿一个返回值
DECLARE v_sql ) := ''; v_count NUMBER; BEGIN v_sql := v_sql || 'select count(1) from scott.emp t'; E ...
- Oracle PLSQL Demo - 29.01.Function结构模板 [无入参] [有返回]
CREATE OR REPLACE FUNCTION function_name RETURN DATE AS v_date DATE; BEGIN ; dbms_output.put_line(v_ ...
- Oracle PLSQL Demo - 27.Declare & Run Sample
declare v_sal ) :; begin --if you could not see the output in console, you should set output on firs ...
- Oracle PLSQL Demo - 20.弱类型REF游标[没有指定查询类型,也不指定返回类型]
declare Type ref_cur_variable IS REF cursor; cur_variable ref_cur_variable; v_ename ); v_deptno ); v ...
- Oracle PLSQL Demo - 19.管道function[查询整表组成list管道返回]
create or replace function function_demo RETURN emp PIPELINED as Type ref_cur_emp IS REF CURSOR RETU ...
随机推荐
- tomcat 禁用access.log
修改 server.xml 注释掉,如: <!-- Access log processes all example. Documentation at: /docs/config/valve. ...
- Windows下如何配置tomcat环境变量
Apache Tomcat 是一款 Java Servlet 和 JavaServer Pages 技术的开源软件实现,可以作为测试 Servlet 的独立服务器,而且可以集成到 Apache Web ...
- POJ 3468 A Simple Problem with Integers 【树状数组】
题目链接:id=3468">http://poj.org/problem?id=3468 题目大意:给出一组数组v[i],有两种操作,一种给出两个数a,b.要求输出v[a]到v[b]之 ...
- 更改npm全局模块和cache默认安装位置
来源于:http://blog.csdn.net/friendan/article/details/51736231 1.因为我安装的Node.js自带了npm,所以在nodejs文件夹里面新建以下两 ...
- jquery serialize对json的包装用法
jquery对象.serialize() 可以多用于表单对数据封装提交 能够收表参数,形成一个json格式字符串, 前提是:必须为每一个表单项取一个name属性 对元素 设置 name属性, 然后 ...
- App上架重磅通知:App Store安全新规17年1月生效
作者:沙铭 来源:公众号 沙铭世界观 ID:mobview 做推广的也许并不了解什么是ATS(App Transport Security),不过这却是一个定时炸弹,引爆点在2016年底,后果就是你不 ...
- 修改注册表值解决ie被恶意窜改的问题
修改注册表值解决ie被恶意窜改的问题 IE消失 运行—Regedit 主键HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDes ...
- Form_Form Builder中的全局变量和程式变量(概念)
2014-12-20 Created By BaoXinjian
- LevelDB场景分析1--整体结构分析
基本用法 数据结构 class DBImpl : public DB { private: struct CompactionState; struct Writer;// Infor ...
- 管道读写规则和Pipe Capacity、PIPE_BUF
一.当没有数据可读时 O_NONBLOCK disable:read调用阻塞,即进程暂停执行,一直等到有数据来到为止. O_NONBLOCK enable:read调用返回-1,errno值为EAGA ...