Mega Code Archive

 
Categories / Oracle PLSQL Tutorial / SQL PLUS Session Environment
 

Set numformat 09999 99

SQL> SQL> create table employees(   2    empno      NUMBER(4)   3  , ename      VARCHAR2(8)   4  , init       VARCHAR2(5)   5  , job        VARCHAR2(8)   6  , mgr        NUMBER(4)   7  , bdate      DATE   8  , msal       NUMBER(6,2)   9  , comm       NUMBER(6,2)  10  , deptno     NUMBER(2) ) ; Table created. SQL> SQL> insert into employees values(1,'Jason',  'N',  'TRAINER', 2,   date '1965-12-18',  800 , NULL,  10); 1 row created. SQL> insert into employees values(2,'Jerry',  'J',  'SALESREP',3,   date '1966-11-19',  1600, 300,   10); 1 row created. SQL> insert into employees values(3,'Jord',   'T' , 'SALESREP',4,   date '1967-10-21',  1700, 500,   20); 1 row created. SQL> insert into employees values(4,'Mary',   'J',  'MANAGER', 5,   date '1968-09-22',  1800, NULL,  20); 1 row created. SQL> insert into employees values(5,'Joe',    'P',  'SALESREP',6,   date '1969-08-23',  1900, 1400,  30); 1 row created. SQL> insert into employees values(6,'Black',  'R',  'MANAGER', 7,   date '1970-07-24',  2000, NULL,  30); 1 row created. SQL> insert into employees values(7,'Red',    'A',  'MANAGER', 8,   date '1971-06-25',  2100, NULL,  40); 1 row created. SQL> insert into employees values(8,'White',  'S',  'TRAINER', 9,   date '1972-05-26',  2200, NULL,  40); 1 row created. SQL> insert into employees values(9,'Yellow', 'C',  'DIRECTOR',10,  date '1973-04-27',  2300, NULL,  20); 1 row created. SQL> insert into employees values(10,'Pink',  'J',  'SALESREP',null,date '1974-03-28',  2400, 0,     30); 1 row created. SQL> SQL> set numformat 9.99 SQL> SQL> select * from employees; EMPNO      last_name       INIT  JOB        MGR BDATE       MSAL DEPTNO ----- -------------------- ----- -------- ----- ---------- ----- ------  1.00 Jason                N     TRAINER   2.00 18-12-1965 #####  #####  2.00 Jerry                J     SALESREP  3.00 19-11-1966 #####  #####  3.00 Jord                 T     SALESREP  4.00 21-10-1967 #####  #####  4.00 Mary                 J     MANAGER   5.00 22-09-1968 #####  #####  5.00 Joe                  P     SALESREP  6.00 23-08-1969 #####  #####  6.00 Black                R     MANAGER   7.00 24-07-1970 #####  #####  7.00 Red                  A     MANAGER   8.00 25-06-1971 #####  ##### EMPNO      last_name       INIT  JOB        MGR BDATE       MSAL DEPTNO ----- -------------------- ----- -------- ----- ---------- ----- ------  8.00 White                S     TRAINER   9.00 26-05-1972 #####  #####  9.00 Yellow               C     DIRECTOR ##### 27-04-1973 #####  ##### ##### Pink                 J     SALESREP null  28-03-1974 #####  ##### 10 rows selected. SQL> SQL> set numformat 09999.99 SQL> SQL> select * from employees;     EMPNO      last_name       INIT  JOB            MGR BDATE           MSAL --------- -------------------- ----- -------- --------- ---------- ---------    DEPTNO ---------  00001.00 Jason                N     TRAINER   00002.00 18-12-1965  00800.00  00010.00  00002.00 Jerry                J     SALESREP  00003.00 19-11-1966  01600.00  00010.00     EMPNO      last_name       INIT  JOB            MGR BDATE           MSAL --------- -------------------- ----- -------- --------- ---------- ---------    DEPTNO ---------  00003.00 Jord                 T     SALESREP  00004.00 21-10-1967  01700.00  00020.00  00004.00 Mary                 J     MANAGER   00005.00 22-09-1968  01800.00     EMPNO      last_name       INIT  JOB            MGR BDATE           MSAL --------- -------------------- ----- -------- --------- ---------- ---------    DEPTNO ---------  00020.00  00005.00 Joe                  P     SALESREP  00006.00 23-08-1969  01900.00  00030.00     EMPNO      last_name       INIT  JOB            MGR BDATE           MSAL --------- -------------------- ----- -------- --------- ---------- ---------    DEPTNO ---------  00006.00 Black                R     MANAGER   00007.00 24-07-1970  02000.00  00030.00  00007.00 Red                  A     MANAGER   00008.00 25-06-1971  02100.00  00040.00     EMPNO      last_name       INIT  JOB            MGR BDATE           MSAL --------- -------------------- ----- -------- --------- ---------- ---------    DEPTNO ---------  00008.00 White                S     TRAINER   00009.00 26-05-1972  02200.00  00040.00  00009.00 Yellow               C     DIRECTOR  00010.00 27-04-1973  02300.00     EMPNO      last_name       INIT  JOB            MGR BDATE           MSAL --------- -------------------- ----- -------- --------- ---------- ---------    DEPTNO ---------  00020.00  00010.00 Pink                 J     SALESREP null      28-03-1974  02400.00  00030.00 10 rows selected. SQL> SQL> drop table employees; Table dropped. SQL>