Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一件简单的事情想做,但在尝试和完成时是如此令人沮丧。我只想获取一些价值,例如:
'a value with line breaks'
并将其插入到CLOB字段中并在 DB2 中保留换行符。像这样的声明
CLOB
insert into some_table (the_clob_field) VALUES('a value with line breaks');
导致a value with line breaks被插入。
a value with line breaks
另一种选择是
insert into some_table (the_clob_field) VALUES('a value with ' || chr(10) ||'line breaks');
insert into sometable the_clob_column values(?);
然后将参数设置为指向您的文本对象。