查询结果中重复的列名 [英] Column name repeating in query results

查看:93
本文介绍了查询结果中重复的列名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在SQL * Plus中提供了一条select语句.它正在检索数据,但是在一定数量的行之后每次都会显示列名称.我希望列名仅显示一次.

I am giving a select statement in SQL*Plus. It is retreiving the data but the column name is displayed every time after certain number of rows. I want the column name to be displayed only once.

例如:

select emp_name from employee.

当前获取输出:

emp_name
========
raman
sunil
rajesh
dilip

emp_name
========
rahul
pramod
ankita

我想要这样的输出:

emp_name
========
pankaj
ruchi
amar
rakesh
dilip
raju
rahul

全部在单列标题下.我该怎么办?

all under single column heading. How can I do that?

推荐答案

之所以会获得这种效果,是因为页面大小小于返回的行数.默认值为14.如果将其设置为大于行数的值,则不会插入其他标题.您可以使用以下命令在sql * plus会话期间设置页面大小:

You get this effect because the page size is less than the number of rows returned. The default is 14. If you set it to a value greater than the number of rows, no additional headers will be inserted. You can set the pagesize during a sql*plus session with this command:

set pagesize n

其中,n是行数.因此,将其设置为200:

where n is then number of rows. So to set it to 200:

set pagesize 200

这篇关于查询结果中重复的列名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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