我在 h2 数据库中有一个 varchar 字段,我希望能够看到每个字符(包括新行和回车等特殊字符)。
基本上,我需要知道Oracle 的 dump()的 h2 等价物。
我在 h2 数据库中有一个 varchar 字段,我希望能够看到每个字符(包括新行和回车等特殊字符)。
基本上,我需要知道Oracle 的 dump()的 h2 等价物。
rawtohex()有效,但stringencode()可能更简单,因为它返回 Java 编码的字符串:
select rawtohex('test' || char(13) || char(444));
> 0074006500730074000d01bc
select stringencode('test' || char(13) || char(444));
> test\r\u01bc
我应该一直在寻找。在h2 文档中找到它:rawtohex()。