oracle sqlplus wrapping results

后端 未结 4 1246
时光说笑
时光说笑 2021-01-07 16:10

When I run a query like:

SELECT * FROM CAR;

the results appear but each row wraps to several lines.

How can I stop this wrapping so

相关标签:
4条回答
  • 2021-01-07 16:21

    This is probably to do with the wrap of the text. I have completed this with my tables and it works:

    SQL> set wrap off;

    0 讨论(0)
  • 2021-01-07 16:31

    Really hard to tell quite what the question actually is; but if you're seeing each row of data wrapped onto multiple lines in SQL*Plus, you need to do set lines 180 or similar; the number you use would ideally be the width of your terminal. The default is 80. You can go wider than the terminal, and it will still wrap, but you may find it easier to read still.

    The documentation for all the set commands is here.

    0 讨论(0)
  • 2021-01-07 16:44

    Had the same problem, even after changing set lines to a big number:

    select * from dba_directories;
    
    OWNER                          DIRECTORY_NAME
    ------------------------------ ------------------------------
    DIRECTORY_PATH
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------
    SYS                            DPUMP_DIR
    C:\xxx
    
    SYS                            CLEAN_PUMP_DIR
    D:\yyy
    
    SYS                            TCMCLEAN_DPUMP_DIR
    C:\zzz
    

    The way to do it was to use also: set wrap off

    OWNER                          DIRECTORY_NAME                 DIRECTORY_PATH
    ------------------------------ ------------------------------ ------------------------------------------
    SYS                            DPUMP_DIR                      C:\xxx
    SYS                            CLEAN_PUMP_DIR                 D:\yyy
    SYS                            TCMCLEAN_DPUMP_DIR             C:\zzz
    
    0 讨论(0)
  • 2021-01-07 16:46

    Are you talking about SQLplus? If so try setting the column format. This webpage gives an example: http://www.adp-gmbh.ch/ora/sqlplus/beautify.html

    0 讨论(0)
提交回复
热议问题