如何增加sqlplus列的输出长度? [英] how to increase sqlplus column output length?

查看:143
本文介绍了如何增加sqlplus列的输出长度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些查询要从模式中找出某些对象的ddl. 我得到的结果列在查询中间被截断.

I have some queries to find out the ddl of some objects from a schema. The result columns I am getting are truncated in the middle of the queries.

如何增加列的宽度?

我尝试过

SET SERVEROUTPUT ON SIZE 1000000;
SET LINESIZE 50000;
set pagesize 50000;
set long 50000;

但是我仍然得到相同的结果.

But I'm still getting the same result.

推荐答案

我刚刚使用了以下命令:

I've just used the following command:

SET LIN[ESIZE] 200

(来自 http://ss64.com/ora/syntax-sqlplus-set. html ).

为清楚起见,有效命令为SET LIN 200SET LINESIZE 200.

For clarity, valid commands are SET LIN 200 or SET LINESIZE 200.

这可以正常工作,但是您必须确保控制台窗口足够宽.如果您直接从MS Windows Command Prompt使用SQL Plus,则无论是否使用SQL Plus Width "属性所设置的值. >规范.

This works fine, but you have to ensure your console window is wide enough. If you're using SQL Plus direct from MS Windows Command Prompt, the console window will automatically wrap the line at whatever the "Screen Buffer Size Width" property is set to, regardless of any SQL Plus LINESIZE specification.

如@simplyharsh所建议,您还可以使用COLUMN col_name FORMAT Ax(其中 x 是所需的长度,以字符为单位)将各个列配置为显示设置的宽度-如果您有一个或两列超大的列,您只希望在控制台屏幕上显示其值的摘要.

As suggested by @simplyharsh, you can also configure individual columns to display set widths, using COLUMN col_name FORMAT Ax (where x is the desired length, in characters) - this is useful if you have one or two extra large columns and you just wish to show a summary of their values in the console screen.

这篇关于如何增加sqlplus列的输出长度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆