SQL*Plus 中的格式描述

发布于 2024-08-19 16:24:20 字数 499 浏览 3 评论 0原文

我喜欢 SQLPlus 中的大行号,这样数据就不会在行之间换行。问题在于,对对象进行描述似乎必须将其自身扩展到整个行大小。这使得我只能看到名称部分而不能向右滚动。我想要的是一种用于描述的线条尺寸,以及用于其他所有内容的不同线条尺寸。要明白我的意思,请在 SQL Plus 中运行以下命令:

set linesize 100;
describe all_tab_columns; --Desired Output
select * from all_tab_columns where rownum<=1;

然后使用较大的行大小。

set linesize 3000;
describe all_tab_columns;
select * from all_tab_columns where rownum<=1; --Desired Output

我所要求的可能是不可能的,所以我也对部分解决方案感兴趣。不断改变线条大小并不是解决方案。

I like a large linesize in SQLPlus so that data doesn't wrap between lines. The problem is that doing a describe on an object seems to be obligated to spread itself over the entire line size. This makes it so that I can only see the name part without scrolling to the right. What I want is one linesize for describes and a different line size for everything else. To see what I mean run the following in SQLPlus:

set linesize 100;
describe all_tab_columns; --Desired Output
select * from all_tab_columns where rownum<=1;

Then use a large line size.

set linesize 3000;
describe all_tab_columns;
select * from all_tab_columns where rownum<=1; --Desired Output

What I am asking may not be possible, so I'd also be interested in partial solutions. Constantly changing the linesize is not a solution.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

箜明 2024-08-26 16:24:20

是什么阻止您设置线条大小?

set linesize 100; 
describe all_tab_columns;
set linesize 3000; 
select * from all_tab_columns where rownum<=1;

如果您经常这样做,请编写 SQL 脚本以使其更加方便。

What is stopping you from setting linesize?

set linesize 100; 
describe all_tab_columns;
set linesize 3000; 
select * from all_tab_columns where rownum<=1;

If you do this often, write SQL scripts to make it more convenient.

爱你是孤单的心事 2024-08-26 16:24:20

我有自己的 DESC 版本作为软件包,所以我这样做
exec DESCR('表名');

代码位于此处。

I've got my own version of DESC as a package, so I do
exec DESCR('table_name');

Code is available Here.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文