When I run a sql statement which supposed to return exact one row, sqlplus print column names many many times ? why ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.
For the purpose of seeing/copy-pasting an entire output as a whole, try
SET PAGESIZE 10000(or some other large number).For exploring the output in the console, you’d probably want to set it to your console window’s height instead (you guessed it – the real “page size”). This way, you’ll see exactly one set of headers, whichever place in the output you’re in – which is exactly this statement’s purpose.
A closely-related command is
SET LINESIZE– output width.