当前位置:数据库 > Oracle >>

oracle 字符长度函数及实例教程

oracle 字符长度函数及实例教程
-- Oracle 里面使用 lengthb
SQL> select lengthb('123456') from dual;

LENGTHB('123456')
-----------------
                6

SQL> select lengthb('123456天津') from dual;

LENGTHB('123456天津')
---------------------

 

mysql教程> select char_length('123456');
+-----------------------+
| char_length('123456') |
+-----------------------+
|                     6 |
+-----------------------+
1 row in set (0.00 sec)

mysql> select char_length('123456天津');
+---------------------------+
| char_length('123456天津')     |
+---------------------------+
|                        10 |
+---------------------------+
1 row in set (0.00 sec)

mysql>

实例三


SQL> select lengthb('123456') from dual;

LENGTHB('123456')
-----------------
                6

SQL> select lengthb('123456天津') from dual;

LENGTHB('123456天津')
---------------------
                   10

SQL>

补充:数据库,Oracle教程
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,