IT开放社区

SELECT单行字符串函数LENGTH、VSIZE取字符串长度

语法:LENGTH(字符串)

         VSIZE(字符串)取字节数

SCOTT@itkaifang> SELECT LENGTH(ename),empno FROM emp;
LENGTH(ENAME)      EMPNO
------------- ----------
     5              7369
     5              7499
     4              7521
     5              7566
     6              7654
     5              7698
     5              7782
     5              7788
     4              7839
     6              7844
     5              7876
     5              7900
     4              7902
     6              7934
14 rows selected.
SCOTT@itkaifang> SELECT LENGTH(empno),ename FROM emp;
LENGTH(EMPNO)      ENAME
------------- ----------
     4             SMITH
     4             ALLEN
     4              WARD
     4             JONES
     4            MARTIN
     4             BLAKE
     4             CLARK
     4             SCOTT
     4              KING
     4            TURNER
     4             ADAMS
     4             JAMES
     4              FORD
     4            MILLER
14 rows selected.
SCOTT@itkaifang>
SCOTT@itkaifang> SELECT VSIZE(ename) FROM emp;
VSIZE(ENAME)
------------
    5
    5
    4
    5
    6
    5
    5
    5
    4
    6
    5
    5
    4
    6
14 rows selected.
SCOTT@itkaifang>

 

相关文章

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

网站分类
最新文章
随机文章
站点信息
  • 文章总数:115
  • 页面总数:2
  • 分类总数:3
  • 标签总数:3
  • 评论总数:0
  • 浏览总数:67055
左邻右舍

BlogPowerBy Z-BlogPHP 1.5 Zero ;Theme By 爱墙纸

IT开放社区:京ICP备13044647号.初创于Oracle DBA实战班.邮箱:admin@itkaifang.com

分享:

支付宝

微信