Oracle sqlplus 行大小

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10656631/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 04:11:23  来源:igfitidea点击:

Oracle sqlplus line size

oraclesqlplus

提问by user595234

In the SQLplus, why I set the line size to max (32767), it still out of format. how to fix it ?

在SQLplus中,为什么我将行大小设置为max(32767),它仍然不符合格式。如何解决?

select * from user_tables
TABLE_NAME                     TABLESPACE_NAME                CLUSTER_NAME                   IOT_NAME                       STATUS     PCT_FREE   PCT_U
_TRANS  MAX_TRANS INITIAL_EXTENT NEXT_EXTENT MIN_EXTENTS MAX_EXTENTS PCT_INCREASE  FREELISTS FREELIST_GROUPS LOG B   NUM_ROWS    BLOCKS EMPTY_BLOCKS  A
  CHAIN_CNT AVG_ROW_LEN AVG_SPACE_FREELIST_BLOCKS NUM_FREELIST_BLOCKS DEGREE    INSTANCES  CACHE TABLE_LO SAMPLE_SIZE LAST_ANAL PAR IOT_TYPE     T S NE
_ ROW_MOVE GLO USE DURATION       SKIP_COR MON CLUSTER_OWNER                  DEPENDEN COMPRESS COMPRESS_FOR       DRO REA

回答by Marc

Made this as a comment above, but submitting as an answer here:

将此作为上面的评论,但在此处作为答案提交:

If you're running this from a command console (e.g. Windows Command Prompt), the console will wrap your lines regardless of your LINESIZE. Spool it to a file and you'll see the effect of your line length setting, which will be A LOT of whitespace characters.

如果您从命令控制台(例如 Windows 命令提示符)运行此命令,则无论您的LINESIZE. 将它假脱机到一个文件,你会看到你的行长度设置的效果,这将是很多空白字符。

回答by jim mcnamara

set lines 9999
set trimspool on
spool myfile.txt
select * from user_tables;
spool off

Bring myfile.txt into an editor, columns will "line up". set trimspool on will get rid of the trailing white space that is confusing you even more.

将 myfile.txt 带入编辑器,列将“对齐”。设置trimspool on 将消除使您更加困惑的尾随空白。

回答by Joe

what is the exact command that you are trying to execute in sql*plus?

您尝试在 sql*plus 中执行的确切命令是什么?

It should be SET LINESIZE ###

它应该是 SET LINESIZE ###

Setting your linesize to 32767 columns is mighty wide, is that you are intending?

将 linesize 设置为 32767 列非常宽,这是您的意图吗?