我在包含嵌入式换行符的某些VARCHAR2字段中有数据(请参阅this question)
然而,似乎数据存储嵌入式换行符的方式不同 - 有些数据可以追溯到90年代中期,所以这并不奇怪。
如何确切地看到字段中嵌入了哪些字符?我已经尝试了sqldeveloper和sql * plus。
答案 0 :(得分:2)
最简单的选择是
SELECT your_column_name, dump( your_column_name, 1013 )
FROM your_table_name
这将显示存储在该列中的每个字符的十进制值。所以,例如
SQL> ed
Wrote file afiedt.buf
1 select ename, dump(ename, 1013) dmp
2* from emp
SQL> /
ENAME DMP
---------- -------------------------------------------------------
smith Typ=1 Len=5 CharacterSet=AL32UTF8: 115,109,105,116,104
ALLEN Typ=1 Len=5 CharacterSet=AL32UTF8: 65,76,76,69,78
WARD Typ=1 Len=4 CharacterSet=AL32UTF8: 87,65,82,68
JONES Typ=1 Len=5 CharacterSet=AL32UTF8: 74,79,78,69,83
MARTIN Typ=1 Len=6 CharacterSet=AL32UTF8: 77,65,82,84,73,78
BLAKE Typ=1 Len=5 CharacterSet=AL32UTF8: 66,76,65,75,69
CLARK Typ=1 Len=5 CharacterSet=AL32UTF8: 67,76,65,82,75
SCOTT Typ=1 Len=5 CharacterSet=AL32UTF8: 83,67,79,84,84
KING Typ=1 Len=4 CharacterSet=AL32UTF8: 75,73,78,71
TURNER Typ=1 Len=6 CharacterSet=AL32UTF8: 84,85,82,78,69,82
ADAMS Typ=1 Len=5 CharacterSet=AL32UTF8: 65,68,65,77,83
SM0 Typ=1 Len=3 CharacterSet=AL32UTF8: 83,77,48
FORD Typ=1 Len=4 CharacterSet=AL32UTF8: 70,79,82,68
MILLER Typ=1 Len=6 CharacterSet=AL32UTF8: 77,73,76,76,69,82
FOO Typ=1 Len=3 CharacterSet=AL32UTF8: 70,79,79
15 rows selected.
答案 1 :(得分:0)