Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set line width for oracle cmd line

I am using SET LINESIZE 32767 for displaying properly data in tables, however there is a table that does not accommodate all the columns, also what is the difference between linesize and SET NUM

TABLE

CREATE TABLE STAFF(
EMP_ID NUMBER NOT NULL,
EMP_NAME VARCHAR2(20),
EMP_DOB DATE,
EMP_TEL VARCHAR2(20),
EMP_EMAIL VARCHAR2(50),
EMP_ADDR VARCHAR2(100),
EMP_HIREDATE DATE,
EMP_ENDDATE DATE,
EMP_SALARY NUMBER(7,2),
EMP_SUPERVISOR NUMBER,
 JOB_CODE NUMBER,
 BRA_CODE NUMBER);

INSERT SAMPLE

INSERT INTO STAFF VALUES (NULL,'Andres Baravalle',to_date('25/03/1975','dd/mm/YYYY'),'723 3403-2817','[email protected]','P.O. Box 879, 1742 Porttitor',to_date('15/04/2007','dd/mm/YYYY'),to_date('19/02/2007','dd/mm/YYYY'),49670,NULL,1,10);

SELECT * FROM STAFF; yields the following

output

Edit----

Guys how can i get rid of all the space in the timestamp attributes

Get rid of space

like image 738
David Garcia Avatar asked Dec 04 '25 22:12

David Garcia


2 Answers

SET LINESIZE sets the total number of characters that SQL*Plus displays on one line before beginning a new line.

However SET NUM is totaly different and sets the default width for displaying numbers.

see here

try setting also your pagesize to be able to see all your table content n one page :

set pagesize n

and increasing your linesize

like image 130
Mouna Cheikhna Avatar answered Dec 07 '25 12:12

Mouna Cheikhna


It looks like your console is wrapping for you. Have you tried outputting that data to a text file and opening it in a proper text editor? Looking it through a console is always going to be constrained by the limits of the console. Spool it out to a file and see what you get.

like image 37
gfortune Avatar answered Dec 07 '25 12:12

gfortune



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!