如何在 Oracle 中的查询结果中显示字段的隐藏字符?
我有两行的 varchar 列根据 Java .equals()
有所不同。我无法轻松更改或调试针对此特定数据库运行的 Java 代码,但我可以使用 SQLDeveloper 直接针对数据库进行查询。这些字段对我来说看起来是一样的(它们是街道地址,有两行由一些新行或回车/新行组合分隔)。
有没有办法查看查询结果中的所有隐藏字符?我想避免将 ascii()
函数与 substr()
一起使用在每一行上找出哪个隐藏字符是不同的。
我还接受一些查询,显示哪个字符是两个字段之间的第一个区别。
I have two rows that have a varchar column that are different according to a Java .equals()
. I can't easily change or debug the Java code that's running against this particular database but I do have access to do queries directly against the database using SQLDeveloper. The fields look the same to me (they are street addresses with two lines separated by some new line or carriage feed/new line combo).
Is there a way to see all of the hidden characters as the result of a query?I'd like to avoid having to use the ascii()
function with substr()
on each of the rows to figure out which hidden character is different.
I'd also accept some query that shows me which character is the first difference between the two fields.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试
更多信息位于文档 。
至于寻找角色不同的位置,这可能会给你一个想法:
Try
More information is in the documentation.
As for finding the position where the character differs, this might give you an idea:
...将打印类似以下内容:
... will print something like: