tags:

views:

50

answers:

2

When I run a sql statement which supposed to return exact one row, sqlplus print column names many many times ? why ?

+1  A: 

Because of its configuration. You can set sqlplus behaviour via SET:

http://ss64.com/ora/syntax-sqlplus-set.html

Daniel
Thanks Daniel. You mean set heading off ? I know this configuration . but as I said, the sql I runned is supposed to return exact one row, when heading is on ,column headin should appear once. but sqlplus print same column heading without returned data many many times.
idiotgenius
Thanks for the link!
AieshaDot
+1  A: 

Probably because your pagesize is much smaller than the number of lines necessary to display the data, due to wrapping. It repeats the heading on each "page" of output, even if it has not completed displaying a single row.

Try SET PAGESIZE 10000 (or some other large number).

Dave Costa
Thanks Dave,I understand it now.
idiotgenius