3

I was using the HR account in the Oracle DB XE on Ubuntu. So I am running the SQL*Plus in the terminal. I know that the maximum displayable linesize is 150 without wrapping but when I display the employee table in the terminal the last two columns end up wrapping around. I have

set lines 150;
set trimout on;
set pagesize 10000;
set tab off;
set wrap on;

and I am seeing displaying the columns

as you can see here the columns LAST_NAME, EMAIL, HIRE_DATE are taking extra blank spaces which could be other wise utilized for displaying the columns which get wrapped. I tried flicking the wrap on and off and that doesn’t help either. How can I optimize the space consumed as I am also spooling the file and the output is very confusing to look at.

1 Answer 1

2

try adding

COLUMN LAST_NAME FORMAT A10 

/

for limit to 10 alfanum char

Sign up to request clarification or add additional context in comments.

6 Comments

thank you for your response, it worked. but i was wondering whether this limit affected while displaying only or even while inserting new elements?
hey i messed up. i did the above query with a number column and now its just returning # signs in that particular column. the employee_id column only had 3 digit numbers to begin with so i went in with A5 but now this. help
You mean column with integer or number value content?
yes, if you look in the picture the first column aka EMPLOYEE_ID has 3 digit numbers. so i formatted with A5. now i am getting #######
try with COLUMN EMPLOYEE_DI FORMAT 999
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.