我正在使用 SQL Plus 11.1.0.6.0 运行一个脚本,该脚本将批量插入到 Oracle 10g 数据库中。我注意到的问题是,将一些代码字符串插入到包含尾随空格的某些行的 clob 字段中时,例如:
....public void myMethod().... --trailing space here
....{
........int myVar = 1;
........ -- empty line with trailing spaces
........myVar+=1
....}
插入表中的字符串会丢失空行中的那些空尾空格并变为:
....public void myMethod() --trailing space is lost
....{
........int myVar = 1;
-- empty line without trailing spaces
........myVar+=1
....}
尽管它对有用的数据没有影响,但这非常令人沮丧,因为它会导致数据与原始数据不同并且无法通过一些测试。
我能找到的只是 SET TRIMSPOOL/TRIMOUT OFF 这不会改变任何东西,有人有其他想法吗?