【持续更新】Oracle 中常用的函数 - 转换篇

一、基础环境

       操作系统:Windows 或 Linux
       数据库版本:Oracle Database 11.2.0.1.0 及以上版本

二、常用的函数

函数名称 函数用法
to_char( number )
将数值类型转换为字符串。
to_char( date,fmt )
将日期类型转换为字符串并格式化为指定格式。如to_char(sysdate,‘YYYY-MM-DD’)
to_number( expr )
函数将 expr 转换为数值数据类型的值。
to_date(char, fmt)
函数将 char转换为日期类型的值。如 to_date(‘2020-01-01’,‘YYYY-MM-DD’)
rawtohex( raw )
将二进制数转换为一个相应的十六进制表示的字符串。如rawtohex(sys_guid())

猜你喜欢

转载自blog.csdn.net/u011046671/article/details/106999059
今日推荐