Here is one of the dumbest questions I can ever imagine a person asking, much less answering:
DBMS_OUTPUT.PUT_LINE is always a bit of a problem when you have strings longer than 80 characters in length, which occurs more frequently with Oracle Database 12c. An example of managing output occurs when you want to print a string with embedded line breaks. My solution is the following
The Oracle Database 12c documentation says you can set the maximum size of a
VARCHAR2 to 32,767 bytes. That’s true except when you’re trying to map a large Java string to a
VARCHAR2. It fails when the physical size of the Java string is greater than 4,000 bytes with an
ORA-01002 or fetch out of sequence error.
There’s a neat optimization in Oracle I found while tinkering around (look closely at the predicate section):