0

I am trying to inspect a database content inside an Oracle XE from a Docker POD, but when I create a query string I get only the first 80 characters from each text column. How could I get the entire content using only the sqlplus terminal, NOT the SQL Developer? I tried to use spool command to send it to a file, but it comes with the same limitation.

Note: THIS EXALMPLE IMAGE MENTIONS CLOB BUT THE COLUMN IS A VARCHAR2, SORRY !

enter image description here

NaN
  • 8,596
  • 20
  • 79
  • 153
  • 1
    Please, check the reference for [`COL[UMN] FOR[MAT] A`](https://docs.oracle.com/en/database/oracle/oracle-database/19/sqpug/COLUMN.html#GUID-643B665F-B134-4A0B-88F7-10400D6D199E) command – astentx Sep 09 '21 at 14:56
  • Your example code is showing a `clob`, not a `varchar2`. See if [this similar question](https://stackoverflow.com/questions/122772/how-do-i-display-the-full-content-of-lob-column-in-oracle-sqlplus) helps. – kfinity Sep 09 '21 at 14:57
  • 3
    Note that if your column is `clob` (as has been pointed out already), the SQL\*Plus command `COLUMN ....` will not help; that is only for `varchar2` columns. To control how much of a `clob` is shown, you need to use a different command: `set long [n]` where `n` is the number of characters to show. You can set it to 1000, or whatever you need. Note that the default (which you can see if you run `show long` in the SQL\*Plus terminal) is 80, explaining what you noticed. –  Sep 09 '21 at 15:01
  • Oh, no, it's not `CLOB` it's just the last thing that I saw in a forum, so I tried, but nothing. This is actually a `VARCHAR2` column, sorry! – NaN Sep 09 '21 at 16:16
  • If your actual problem has to do with a `clob`, could you update the question so that your example isn't using a `clob`? `SQL*Plus` deals with the two data types pretty differently so I'm not sure what your real problem is. – Justin Cave Sep 09 '21 at 20:35
  • Does this answer your question? [How do I display the full content of LOB column in Oracle SQL\*Plus?](https://stackoverflow.com/questions/122772/how-do-i-display-the-full-content-of-lob-column-in-oracle-sqlplus) – Roberto Hernandez Sep 10 '21 at 06:01
  • Perhaps part of the confusion is that SQL\*Plus cares about the type of the *expression*, which is not necessarily the same as the original *column*. While your column may be a VARCHAR2, the `TO_CLOB` function converts the value into a CLOB, so the CLOB rules apply here. – Jon Heller Sep 10 '21 at 17:32

0 Answers0