Home > Database > Mysql Tutorial > body text

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

WBOY
Release: 2016-06-07 17:45:40
Original
1988 people have browsed it

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

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

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

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

 

> 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>

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!