更新时间:2022-01-12 23:09:51
获取CLOB列的子字符串并使用具有大小/缓冲区限制的查询工具时,有时需要将BUFFER设置为更大的大小.例如,在使用SQL Plus时,使用SET BUFFER 10000
将其设置为10000,默认值为4000.
When getting the substring of a CLOB column and using a query tool that has size/buffer restrictions sometimes you would need to set the BUFFER to a larger size. For example while using SQL Plus use the SET BUFFER 10000
to set it to 10000 as the default is 4000.
运行DBMS_LOB.substr
命令,您还可以指定要返回的字符数和偏移量.因此,使用DBMS_LOB.substr(column, 3000)
可能会将其限制为缓冲区的足够小量.
Running the DBMS_LOB.substr
command you can also specify the amount of characters you want to return and the offset from which. So using DBMS_LOB.substr(column, 3000)
might restrict it to a small enough amount for the buffer.
请参见 Oracle文档有关substr命令的更多信息
See oracle documentation for more info on the substr command
DBMS_LOB.SUBSTR (
lob_loc IN CLOB CHARACTER SET ANY_CS,
amount IN INTEGER := 32767,
offset IN INTEGER := 1)
RETURN VARCHAR2 CHARACTER SET lob_loc%CHARSET;