永发信息网

求解:db2 length函数疑问

答案:2  悬赏:70  手机版
解决时间 2021-04-26 10:48
求解:db2 length函数疑问
最佳答案
你的编码是多少???不同编码取的长度不一样的..

官网溜达了下..db2 9版本后的说明
LENGTH ( expression, CODEUNITS16/ CODEUNITS32/ OCTETS )

CODEUNITS16, CODEUNITS32, or OCTETS Specifies the string unit of the result.
CODEUNITS16 specifies that the result is to be expressed in 16-bit UTF-16 code units. CODEUNITS32 specifies that the result is to be expressed in 32-bit UTF-32 code units. OCTETS specifies that the result is to be expressed in bytes. If a string unit is explicitly specified, and if expression is not string data, an error is returned (SQLSTATE 428GC). If a string unit is specified as CODEUNITS16 or CODEUNITS32, and expression is a binary string or bit data, an error is returned (SQLSTATE 428GC). If a string unit is specified as OCTETS and expression is a binary string, an error is returned (SQLSTATE 42815). For more information about CODEUNITS16, CODEUNITS32, and OCTETS, see “String units in built-in functions” in “Character strings”.追问不同编码对decimal类型的长度会有影响吗?我认为不是这个的原因。追答官网就这么说的..

仔细看看..CODEUNITS16, CODEUNITS32, or OCTETS Specifies the string unit of the result.CODEUNITS16 specifies that the result is to be expressed in 16-bit UTF-16 code units. CODEUNITS32 specifies that the result is to be expressed in 32-bit UTF-32 code units.
全部回答
你标题上写的是DB2的length,下面说的是oracle的length两个数据一样吗,是不是你比较错了?
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
外表坚强好吗?!
3GP的转换器 谁有? 要速度快的安全的 有的给
关于跑酷的问题!
祥福南街我想知道这个在什么地方
烽火战国的生产资源任务怎么完成?
怎么把笔记本里面无线网络安装向导的多余选择
南开大学微电子学研究所地址有知道的么?有点
打嗝吃什么药好,经常打嗝,应该吃什么药
这个是什么故障
汽车修理场解码仪用什么品牌的最好?
丰田奥徳赛车锁不见怎么办?
从古到今历史有没有记载姓罗和谢成为夫妻的人
屋子漏水 100分
天津建设银行与哪些证券公司有第三方协议?
丰姿魅在什么地方啊,我要过去处理事情
推荐资讯
求时尚旅游拖包和挎包
一个人寂寞的时候还能做什么呢?
手机360 急救箱杀毒后重启后开不了机,怎么办
户型穿堂煞怎么化解,风水,我家的格局是不是
地下城与勇士刷图职业
蚧蛤是什么
什么人一年只上一天班而且还不怕炒鱿鱼
山西特产办公用品地址在什么地方,想过去办事
怎么才能使自己花园更美
I miss you.I miss you.I miss you.Finally,I
二级域名的IIS URLReWrite方法
3GQQ花园里的鲜花如果不及时采花送友,可以一
正方形一边上任一点到这个正方形两条对角线的
阴历怎么看 ?