column format: ascii type, 26 letter long : Column « SQL Plus « Oracle PL / SQL






column format: ascii type, 26 letter long

    
SQL>
SQL> create table courses
  2  ( code        VARCHAR2(6)  constraint C_PK primary key
  3  , description VARCHAR2(30)
  4  , category    CHAR(3)
  5  , duration    NUMBER(2)
  6  ) ;

Table created.

SQL> insert into courses values('SQL','SQL','GEN',4);

1 row created.

SQL> insert into courses values('OAU','Java','GEN',1);

1 row created.

SQL> insert into courses values('JAV','C++','BLD',4);

1 row created.

SQL> insert into courses values('PLS','C','BLD',1);

1 row created.

SQL> insert into courses values('XML','XML','BLD',2);

1 row created.

SQL> insert into courses values('ERM','ERP','DSG',3);

1 row created.

SQL> insert into courses values('PMT','ERP','DSG',1);

1 row created.

SQL> insert into courses values('RSD','jQuery','DSG',2);

1 row created.

SQL> insert into courses values('PRO','Linux','DSG',5);

1 row created.

SQL> insert into courses values('GEN','Oracle','DSG',4);

1 row created.

SQL>
SQL>
SQL> select * from courses
  2  where  category = 'BLD';

CODE   DESCRIPTION                CAT   DURATION
------ -------------------------- --- ----------
JAV    C++                        BLD          4
PLS    C                          BLD          1
XML    XML                        BLD          2

SQL> COL description FORMAT a26
SQL> /

CODE   DESCRIPTION                CAT   DURATION
------ -------------------------- --- ----------
JAV    C++                        BLD          4
PLS    C                          BLD          1
XML    XML                        BLD          2

SQL>
SQL> drop table courses;

Table dropped.

SQL>

   
    
    
    
  








Related examples in the same category

1.Use 'format a30 heading' to define column name
2.Column format $9,999.99
3.Column heading format a13
4.column localtimestamp format a28
5.Use a13 to set the column length during displaying
6.Aligning decimals
7.Adding a group separator
8.Including a currency symbol
9.Wrapping text
10.JUSTIFY CENTER
11.JUSTIFY RIGHT
12.Disable the column formatting
13.SET string to display when value is NULL
14.COLUMN Salary heading "Current|Salary" format $9999.99
15.COLUMN fname heading "emp|Name" format a10
16.COLUMN id heading "emp|Number" format 9999
17.Copy column format with 'col ... like'
18.column number format
19.Column data is aligned by type
20.Word Wrapped column format
21.Set number column format
22.Set column format before doing the query
23.Set column heading with column command
24.Set column separation with colsep