Reputation: 233
Im using oracle 11g ex edition. From a text book I found the format option but its not working.The table structure is as follows.
Name Null? Type
----------------------------------------- -------- ----------------------------
ID NUMBER(4)
NAME NOT NULL VARCHAR2(5)
ADDRESS VARCHAR2(20)
PINCODE NUMBER(6)
LOCATION NUMBER(2)
DOB DATE
I used this command
column name format A12
select name "USERNAME" from hai;
I expected to display the column heading as USERNAME. But it displays only USERN . When using the format option it need to display 12 charcter but it showing only 5 as in the table definition. Why? The query result is given below
USERN
-----
korna
Upvotes: 0
Views: 750
Reputation: 2602
Because you didnot set format for USERNAME;
TRY THIS:
col USERNAME format a8
Upvotes: 5