`

oracle substr substrb instr instrb

阅读更多
b表示按照字节查询

SQL> select substr('qq表情cn13e',1,4) from dual;
SUBS
----
qq表情

SQL> select substrb('qq表情cn13e',1,4) from dual;

SU
--
qq表(一个汉字占用两个直接)

09:54:56 SQL> select instr('表情cn13e','c',1,1) from dual;

INSTR('表情CN13E,'C',1,1)
---------------------------
3

已用时间: 00: 00: 00.10
09:55:08 SQL> select instrb('表情cn13e','c',1,1) from dual;

INSTRB('表情CN13E,'C',1,1)
----------------------------
5

已用时间: 00: 00: 00.10
09:55:15 SQL> select instr('表情cn13e','c',4,1) from dual;

INSTR('表情CN13E,'C',4,1)
---------------------------
0

已用时间: 00: 00: 00.10
09:55:25 SQL> select instrb('表情cn13e','c',4,1) from dual;

INSTRB('表情CN13E,'C',4,1)
----------------------------
5
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics