Go Back

PLSQL 9

PL/SQL -> PLSQLBasics

INTRODUCTION TO PL/SQL 8:

PLSQL Using DBMS_OUTPUT and UTL_FILE PACKAGES:

DBMS_OUTPUT:

 
DECLARE 
    v_sal NUMBER(10); 
BEGIN 
    SELECT sal 
      INTO v_sal 
      FROM emp 
     WHERE empno = &empno; 

    dbms_output.Put_line(v_sal); 
END; 
/

Enter value for empno: 7369

old   5: WHERE EMPNO=&EMPNO;

new   5: WHERE EMPNO=7369;

PL/SQL procedure successfully completed.

SQL> SET SERVEROUTPUT ON

SQL> /

Enter value for empno: 7369

old   5: WHERE EMPNO=&EMPNO;

new   5: WHERE EMPNO=7369;

800                                                                                                                               

PL/SQL procedure successfully completed.

Disabling and Enabling Output

 

BEGIN 
    dbms_output.DISABLE; 
END; 

PL/SQL procedure successfully completed.


DECLARE 
    v_sal NUMBER(10); 
BEGIN 
    SELECT sal 
      INTO v_sal 
      FROM emp 
     WHERE empno = &empno; 

    dbms_output.Put_line(v_sal); 
END; 

/ 

Enter value for empno: 7369

old   5: WHERE EMPNO=&EMPNO;

new   5: WHERE EMPNO=7369;

PL/SQL procedure successfully completed.

BEGIN 
    dbms_output.ENABLE; 
END; 

/ 

PL/SQL procedure successfully completed.

DECLARE 
    v_sal NUMBER(10); 
BEGIN 
    SELECT sal 
      INTO v_sal 
      FROM emp 
     WHERE empno = &empno; 

    dbms_output.Put_line(v_sal); 
END; 

/ 
Enter value for empno: 7369

old   5: WHERE EMPNO=&EMPNO;

new   5: WHERE EMPNO=7369;

800                                                                                                                               

PL/SQL procedure successfully completed.

DECLARE 
BEGIN 
    dbms_output.ENABLE(2000); 

    dbms_output.Put_line('THREE NAMES WILL BE WRITTEN.'); 

    dbms_output.Put('RAJESH'); 

    dbms_output.new_line; 

    dbms_output.Put('RAGHU'); 

    dbms_output.new_line; 

    dbms_output.Put('SHRITHAN'); 

    dbms_output.new_line; 
END; 

/ 

THREE NAMES WILL BE WRITTEN.                                                                                                      

RAJESH                                                                                                                             

RAGHU                                                                                                                           

SHRITHAN                                                                                                                          

PL/SQL procedure successfully completed.


SQL> SET SERVEROUTPUT OFF

BEGIN 
    dbms_output.ENABLE(2000); 

    dbms_output.Put_line('THREE NAMES WILL BE WRITTEN.'); 

    dbms_output.Put('RAJESH'); 

    dbms_output.new_line; 

    dbms_output.Put('RAGHU'); 

    dbms_output.new_line; 

    dbms_output.Put('SHRITHAN'); 

    dbms_output.new_line; 
END; 
/

PL/SQL procedure successfully completed.

SET serveroutput ON 
DECLARE 
    throw_away VARCHAR2(50); 
    name1      VARCHAR2(10); 
    name2      VARCHAR2(10); 
    name3      VARCHAR2(10); 
    status     NUMBER; 
BEGIN 
    dbms_output.Get_line(throw_away, status); 

    dbms_output.Get_line(name1, status); 

    dbms_output.Get_line(name2, status); 

    dbms_output.Get_line(name3, status); 

    dbms_output.Put_line(name1 
                         ||'AND' 
                         ||name2 
                         ||'AND' 
                         ||name3); 
END; 
SQL> /

RAJESH AND RAGHU AND SHRITHAN                                                                                                        

PL/SQL procedure successfully completed.

UTL_FILE PACKAGE:

 
DECLARE 
    file_handle utl_file.file_type; 
    data_line   VARCHAR2(100); 
BEGIN 
    file_handle := utl_file.Fopen('C:\RAJESH', 'RAJESH.TXT', 'R'); 

    utl_file.Get_line(file_handle, data_line); 

    dbms_output.Put_line(data_line); 

    utl_file.Get_line(file_handle, data_line); 

    dbms_output.Put_line(data_line); 

    utl_file.Get_line(file_handle, data_line); 

    dbms_output.Put_line(data_line); 

    utl_file.Fclose(file_handle); 
END; 

/ 

PL/SQL procedure successfully completed.

SQL> SET SERVEROUTPUT ON

SQL> /

GOD IS GREAT.                                                                                                                     

AYAN IS GOOD BOY.                                                                                                                

AYN RAND IS CUTE GIRL.                                                                                                             

PL/SQL procedure successfully completed.


DECLARE 
    file_handle utl_file.file_type; 
    data_line   VARCHAR2(100); 
BEGIN 
    file_handle := utl_file.Fopen('C:\AYAN', 'FILENAME.TXT', 'W'); 

    FOR v_emp IN (SELECT empno, 
                         ename, 
                         job 
                    FROM emp) LOOP 
        utl_file.Put_line(file_handle, To_char(v_emp.empno) 
                                       || ',"' 
                                       || v_emp.ename 
                                       ||',"' 
                                       ||v_emp.job 
                                       ||'"'); 
    END LOOP; 

    utl_file.Fclose(file_handle); 
END; 

/ 

PL/SQL procedure successfully completed.

Creation of directory:

 
SQL> CREATE OR REPLACE DIRECTORY NEW_DIRECTORY AS 'C:\ORACLE\RAJESH';

Directory created.

DROPING DIRECTORY:

SQL> DROP DIRECTORY NEW_DIRECTORY;

Directory dropped.

CREATING EXTERNAL TABLE:

 

CREATE TABLE oldemp 
  ( 
     empno NUMBER, 
     ename CHAR(20), 
       job CHAR(20) 
  ) 
organization external (TYPE oracle_loader DEFAULT directory new_directory ACCESS 
                      parameters (records 
                      delimited BY newline badfile 'BAD_EMP' LOGFILE 'LOG_EMP' 
                      fields terminated BY ',' (empno CHAR, ename CHAR, job CHAR 
                      )) location ('EXT.TXT')) 
PARALLEL 5 
REJECT LIMIT 200
/

Table created.



SQL> DESC OLDEMP
 Name                                                                    Null?    Type
 ----------------------------------------------------------------------- -------- ------------------------------------------------
 EMPNO                                                                            	NUMBER
 ENAME                                                                            	CHAR(20)
 JOB                                                                              	CHAR(20)

CREATE TABLE newemp 
  ( 
     empno NUMBER(10), 
     ename VARCHAR2(20), 
       job VARCHAR2(20) 
  ) 
SQL> /

Table created.

INSERT INTO newemp 
SELECT empno, 
       ename, 
       job 
  FROM oldemp; 

4 rows created.

SQL> SELECT * 
       FROM newemp;

     EMPNO ENAME                JOB                                                                                               
---------- -------------------- --------------------                                                                              
        10 AYAN                	MANAGER                                                                                           
        20 AYN RAND              	MANAGER                                                                                           
        30 SHRITHAN             	MANAGER                                                                                           
        40 SRIDEVI              	MANAGER                                                                                           

SQL> SELECT * 
       FROM oldemp;

     EMPNO ENAME                JOB                                                                                               
---------- -------------------- --------------------                                                                              
        10 AYAN                	MANAGER                                                                                           
        20 AYN RAND              	MANAGER                                                                                           
        30 SHRITHAN             	MANAGER                                                                                           
        40 SRIDEVI              	MANAGER                                                                                           

SQL> DESC oldemp
 Name                                                                    Null?    Type
 ----------------------------------------------------------------------- -------- ------------------------------------------------
 EMPNO                                                                            	NUMBER
 ENAME                                                                            	CHAR(20)
 JOB                                                                              	CHAR(20)
 
 

NVL2:
The NVL2 function examines the first expression.
If the first expression is not null, then nvl2 function returns the second expression.
If the first expression is null, then the third expression is returned.

 
SELECT empno, 
       sal, 
       comm, 
       Nvl2(comm, 'SAL+COMM', 'SAL') INCOME 
  FROM emp; 

     EMPNO        SAL       COMM INCOME                                                                                           
---------- ---------- ---------- --------                                                                                         
      7369        800            		SAL                                                                                              
      7499       1600        	300 SAL+COMM                                                                                         
      7521       1250        	500 SAL+COMM                                                                                         
      7566       2975            		SAL                                                                                              
      7654       1250       	1400 SAL+COMM                                                                                         
      7698       2850            		SAL                                                                                              
      7782       2450            		SAL                                                                                              
      7788       3000           	 	SAL                                                                                              
      7839       5000            		SAL                                                                                              
      7844       1500          	0	SAL+COMM                                                                                         
      7876       1100            		SAL                                                                                              
      7900        950            		SAL                                                                                              
      7902       3000            		SAL                                                                                              
      7934       1300            		SAL                                                                                              

14 rows selected.

SELECT empno, 
       sal, 
       comm, 
       Nvl2(comm, sal + comm, sal) INCOME 
  FROM emp; 

     EMPNO        SAL       COMM     INCOME                                                                                       
---------- ---------- ---------- ----------                                                                                       
      7369        800                800                                                                                       
      7499       1600        300     1900                                                                                       
      7521       1250        500     1750                                                                                       
      7566       2975                2975                                                                                       
      7654       1250       1400     2650                                                                                       
      7698       2850                2850                                                                                       
      7782       2450                2450                                                                                       
      7788       3000                3000                                                                                       
      7839       5000                5000                                                                                       
      7844       1500          0     1500                                                                                       
      7876       1100                1100                                                                                       
      7900        950                950                                                                                       
      7902       3000                3000                                                                                       
      7934       1300                1300                                                                                       

14 rows selected.

SELECT empno, 
       sal, 
       comm, 
       sal + Nvl(comm, 0) INCOME 
  FROM emp; 

     EMPNO        SAL       COMM     INCOME                                                                                       
---------- ---------- ---------- ----------                                                                                       
      7369        800                  800                                                                                       
      7499       1600        300       1900                                                                                       
      7521       1250        500       1750                                                                                       
      7566       2975                  2975                                                                                       
      7654       1250       1400       2650                                                                                       
      7698       2850                  2850                                                                                       
      7782       2450                  2450                                                                                       
      7788       3000                  3000                                                                                       
      7839       5000                  5000                                                                                       
      7844       1500          0       1500                                                                                       
      7876       1100                  1100                                                                                       
      7900        950                  950                                                                                       
      7902       3000                  3000                                                                                       
      7934       1300                  1300                                                                                       

14 rows selected.

NULLIF:
The NULLIF function compares two expressions.
If they are equal, the function returns null.
If they are not equal, the function returns the first expression.

 
SELECT ename, 
       job 
  FROM emp; 

ENAME      JOB                                                                                                                    
---------- ---------                                                                                                              
SMITH      CLERK                                                                                                                  
ALLEN      SALESMAN                                                                                                               
WARD       SALESMAN                                                                                                               
JONES      MANAGER                                                                                                                
MARTIN     SALESMAN                                                                                                               
BLAKE      MANAGER                                                                                                                
CLARK      MANAGER                                                                                                                
SCOTT      ANALYST                                                                                                                
KING       PRESIDENT                                                                                                              
TURNER     SALESMAN                                                                                                               
ADAMS      CLERK                                                                                                                  
JAMES      CLERK                                                                                                                  
FORD       ANALYST                                                                                                                
MILLER     CLERK                                                                                                                  

14 rows selected.

SELECT ename, 
       Length(ename)                      "EXPR1", 
       Length(job)                        "EXPR2", 
       Nullif(Length(ename), Length(job)) "RESULT" 
  FROM emp;
  
SQL> /

ENAME           EXPR1      EXPR2     RESULT                                                                                       
---------- ---------- ---------- ----------                                                                                       
SMITH               	5          5                                                                                                  
ALLEN               	5          8          5                                                                                       
WARD                	4          8          4                                                                                       
JONES               	5          7          5                                                                                       
MARTIN              	6          8          6                                                                                       
BLAKE               	5          7          5                                                                                       
CLARK               	5          7          5                                                                                       
SCOTT               	5          7          5                                                                                       
KING                	4          9          4                                                                                       
TURNER              	6          8          6                                                                                       
ADAMS               	5          5                                                                                                  
JAMES               	5          5                                                                                                  
FORD                	4          7          4                                                                                       
MILLER              	6          5          6                                                                                       

14 rows selected.

COALESCE:
The COALESCE function returns the first non-null expression in the list.
COALESCE(expr1, expr2, ……exprn)
IN SYNTAX:
Expr1 returns this expression if it is not null.
Expr2 returns this expression if the first expression is null and this expression is not null.
Exprn returns this expression if the preceding expressions are null.

 
SELECT empno, 
       ename, 
       Coalesce(comm, sal, 10) COMM 
  FROM emp 
 ORDER BY comm; 

     EMPNO ENAME            COMM                                                                                                  
---------- ---------- ----------                                                                                                  
      7844 TURNER             0                                                                                                  
      7499 ALLEN             	300                                                                                                  
      7521 WARD              	500                                                                                                  
      7369 SMITH             	800                                                                                                  
      7900 JAMES             	950                                                                                                  
      7876 ADAMS            	1100                                                                                                  
      7934 MILLER           	1300                                                                                                  
      7654 MARTIN           	1400                                                                                                  
      7782 CLARK            	2450                                                                                                  
      7698 BLAKE            	2850                                                                                                  
      7566 JONES            	2975                                                                                                  
      7788 SCOTT            	3000                                                                                                  
      7902 FORD             	3000                                                                                                  
      7839 KING             	5000                                                                                                  

14 rows selected.


SELECT empno, 
       ename, 
       sal, 
       comm, 
       Coalesce(comm, sal, 10) "COMMISSION" 
  FROM emp 
 ORDER BY comm 
SQL> /

     EMPNO ENAME             SAL       COMM COMMISSION                                                                            
---------- ---------- ---------- ---------- ----------                                                                            
      7844 TURNER           	1500          0          	0                                                                            
      7499 ALLEN            	1600        300        	300                                                                            
      7521 WARD             	1250        500        	500                                                                            
      7654 MARTIN           	1250       1400       	1400                                                                            
      7369 SMITH             	800                   	800                                                                            
      7566 JONES            	2975                  	2975                                                                            
      7900 JAMES             	950                   	950                                                                            
      7934 MILLER           	1300                  	1300                                                                            
      7902 FORD             	3000                  	3000                                                                            
      7876 ADAMS            	1100                  	1100                                                                            
      7698 BLAKE            	2850                  	2850                                                                            
      7782 CLARK            	2450                  	2450                                                                            
      7788 SCOTT            	3000                  	3000                                                                            
      7839 KING             	5000                  	5000                                                                            

14 rows selected.

INSERT INTO emp 
     VALUES (1, 
             'AYAN', 
             'MANAGER', 
             7369, 
             '01-DEC-05', 
             NULL, 
             NULL, 
             10); 

1 row created.

INSERT INTO emp 
     VALUES (2, 
             'FILENAME', 
             'MANAGER', 
             7369, 
             '01-DEC-05', 
             NULL, 
             NULL, 
             10);
SQL> /

1 row created.


SELECT empno, 
       ename, 
       sal, 
       comm, 
       Coalesce(comm, sal, 10) "COMMISSION" 
  FROM emp 
 ORDER BY comm; 

     EMPNO ENAME             SAL       COMM     COMMISSION                                                                            
---------- ----------    ---------- ----------  ----------                                                                            
      7844 TURNER           	1500          0         0                                                                            
      7499 ALLEN            	1600        300        	300                                                                            
      7521 WARD             	1250        500        	500                                                                            
      7654 MARTIN           	1250       1400       	1400                                                                            
      7369 SMITH             	800                   	800                                                                            
      7566 JONES            	2975                  	2975                                                                            
      7900 JAMES             	950                   	950                                                                            
      7934 MILLER           	1300                  	1300                                                                            
         2 FILENAME                                   10                                                                            
         1 AYAN                                    	10                                                                            
      7902 FORD               3000                    3000                                                                            
      7876 ADAMS            	1100                  	1100                                                                            
      7698 BLAKE            	2850                  	2850                                                                            
      7782 CLARK            	2450                  	2450                                                                            
      7788 SCOTT            	3000                  	3000                                                                            
      7839 KING             	5000                  	5000                                                                            

16 rows selected.

CURSOR FOR UPDATE CLAUSE:
You may want to lock rows before update or delete rows.
Add the for update clause in the cursor query to lock the affected rows when the cusor is opened.
SELECT … FROM …..
FOR UPDATE [OF COLUMN_REFERENCE] [NO WAIT];
IN THE SYNTAX:
1. COLUMN_REFERENCE: Is a column in the table against which the query is performed. (A list of columns may also be used).
2. NO WAIT: Returns an oracle error if the rows are locked by another session. If you won’t specify it waits untill the lock releases.
This is useful when you want to base an update on exsiting values in a row. In that case,you must make sure the row is not changed by another user before the update.
The for update clause will be the last clause in a select statement even after order by.
When ever you commit or rollback locks will be released.

 
DECLARE
CURSOR EMP_CURSOR IS
SELECT * FROM EMP WHERE DEPTNO=10 FOR UPDATE OF SAL  NOWAIT;

The where current of clause:
WHERE CURRENT OF CURSOR:
Use cursors to update or delete the current row.
Include the for update clause in the cursor query to lock the rows first.
Use the where current of clause to reference the current row from an explicit cursor.

 
DECLARE 
    CURSOR sal_cursor IS 
      SELECT * 
        FROM emp 
       WHERE deptno = 10 
      FOR UPDATE OF salary NOWAIT; 
BEGIN 
    FOR emp_record IN sal_cursor LOOP 
        IF emp_record.sal < 5000 THEN 
          UPDATE emp 
             SET sal = emp_record.sal * 1.10 
           WHERE CURRENT OF sal_cursor; 
        END IF; 
    END LOOP; 
END; 

CREATING INDEXES:
AN INDEX:
1. Is a schema object.
2. Is used by the oracle server to spped up the retrieval of rows by using a pointer.
3. Can reduce disk i/o by using a rapid path access method to locate data quickly.
4. Is independent of the table it indexes.
5. Is used and maintained automatically by the oracle server.
AUTOMATICALLY:
A unqiue index is created automatically when you define a primary key or unique constraint in a table definition.
MANUALLY:
User explicitly can create indexes for speed up the access to the rows.
CREATING NON-UNIQUE_INDEX:

 
CREATE INDEX emp1_empno_idx 
  ON emp1(empno); 

Index created.

SELECT index_name, 
       index_type, 
       table_name, 
       uniqueness 
  FROM user_indexes; 

INDEX_NAME  INDEX_TYPE    TABLE_NAME                     UNIQUENES                               
------------------------------ --------------------------- ------------------------------ ---------                               
EMP1_EMPNO_IDX   NORMAL    EMP1                           NONUNIQUE                               
PK_DEPT                   NORMAL     DEPT                           UNIQUE                                  
PK_EMP                    NORMAL       EMP                             UNIQUE                                  

CREATING UNIQUE_INDEX:

 
CREATE UNIQUE INDEX dept1_deptno_idx 
  ON dept1(deptno); 

Index created.

SELECT index_name, 
       index_type, 
       table_name, 
       uniqueness 
  FROM user_indexes; 

INDEX_NAME  INDEX_TYPE  TABLE_NAME                     UNIQUENES                               
------------------------------ --------------------------- ------------------------------ ---------                               
DEPT1_DEPTNO_IDX    NORMAL  DEPT1                          UNIQUE                                  
EMP1_EMPNO_IDX        NORMAL  EMP1                           NONUNIQUE                               
PK_DEPT                        NORMAL  DEPT                           UNIQUE                                  
PK_EMP                         NORMAL   EMP                            UNIQUE                                  

CREATING COMPOSITE_INDEX:

 
CREATE INDEX emp1_empno_ename_idx 
  ON emp1(empno, ename); 

Index created.

SELECT index_name, 
       index_type, 
       table_name, 
       uniqueness 
  FROM user_indexes; 

INDEX_NAMEINDEX_TYPE TABLE_NAME  			UNIQUENES                               
------------------------------ --------------------------- ------------------------------ ---------                               
DEPT1_DEPTNO_IDX   NORMAL DEPT1     			UNIQUE                                  
EMP1_EMPNO_ENAME_IDX NORMAL  EMP1                           	NONUNIQUE                               
EMP1_EMPNO_IDX       NORMAL EMP1                           		NONUNIQUE                               
PK_DEPT                        NORMAL DEPT                           		UNIQUE                                  
PK_EMP                         NORMAL  EMP                            		UNIQUE                                  

CREATING FUNCTIONBASED_INDEX:

 
CREATE INDEX dept1_fundname_idx 
  ON dept1(Upper(dname)); 

Index created.

SELECT index_name, 
       index_type, 
       table_name, 
       uniqueness 
  FROM user_indexes; 

  

CREATING BITMAP_INDEX:

 
CREATE bitmap INDEX bitmap_emp1_job_idx 
  ON emp1(job); 

Index created.

SELECTING COLUMN NAMES ON WHICH INDEXES CREATED:

SELECT UC.index_name, 
       UC.column_name, 
       UI.uniqueness 
  FROM user_indexes UI, 
       user_ind_columns UC 
 WHERE UI.index_name = UC.index_name 
       AND UC.table_name = 'EMP1' 
SQL> /

INDEX_NAME                                                                                                                        
------------------------------                                                                                                    
COLUMN_NAME                                                                                                                       
----------------------------------------------------------------------------------------------------------------------------------
UNIQUENES                                                                                                                         
---------                                                                                                                         
EMP1_EMPNO_IDX                                                                                                                    
EMPNO                                                                                                                             
NONUNIQUE                                                                                                                         
                                                                                                                                  
EMP1_EMPNO_ENAME_IDX                                                                                                              
EMPNO                                                                                                                             
NONUNIQUE                                                                                                                         
                                                                                                                                  
EMP1_EMPNO_ENAME_IDX                                                                                                              
ENAME                                                                                                                             
NONUNIQUE                                                                                                                         
                                                                                                                                  
BITMAP_EMP1_JOB_IDX                                                                                                               
JOB                                                                                                                               
NONUNIQUE                                                                                                                         
                                                                                                                                  
REMOVING INDEX:

DROP INDEX INDEX_NAME;

WHEN TO CREATE AN INDEX:
1 A COLUMN CONTAINS A WIDE RANGE OF VALUES.
2 A COLUMN CONTAINS LARGE NUMBER OF NULL VALES.
3 ONE OR MORE COLUMNS ARE FREQUENTLY USED TOGETHER
IN A WHERE CLAUSE.
WHEN TO NOT CREATE AN INDEX:
1 THE TABLE IS SMALL.
2 THE COLUMNS ARE NOT OFTEN USED AS CONDITION IN THE QUERY.
3 THE TABLE IS UPDATED FREQUENTLY.
BREAK (SQL * PLUS COMMAND):
TO SUPRESS DUPLICATES WE USE BREAK IN SQL PROMPT.

 
SQL> BREAK ON JOB

SELECT * 
  FROM emp 
 ORDER BY job; 

EMPNO ENAME JOB  MGR    HIREDATE         SAL       COMM     DEPTNO                                             
---------- ----- ----- --------- ---------- --------- ---------- ---------- ----------                                             
      7788 SCOTT ANALYST   7566 19-APR-87   3000                    	20                                             
      7902 FORD            7566 03-DEC-81   3000                    	20                                             
      7369 SMITH  CLERK    7902 17-DEC-80   800                    		20                                             
      7876 ADAMS           7788 23-MAY-87   1100                    	20                                             
      7934 MILLER          7782 23-JAN-82   1300                    	10                                             
      7900 JAMES           7698 03-DEC-81   950                    	30                                             
      7566 JONES MANAGER   7839 02-APR-81   2975                    	20                                             
      7782 CLARK           7839 09-JUN-81   2450                    	10                                             
      7698 BLAKE           7839 01-MAY-81   2850                    	30                                             
      7839 KING    PRESIDENT         17-NOV-81    5000                    	10                                             
      7499 ALLEN SALESMAN  7698 20-FEB-81    1600        300         	30                                             
      7654 MARTIN                     7698 28-SEP-81   1250       1400         	30                                             
      7844 TURNER                    7698 08-SEP-81   1500          0         	30                                             
      7521 WARD                         7698 22-FEB-81   1250        500         	30                                             

14 rows selected.

SQL> CLEAR BREAK;
breaks cleared

SELECT * 
  FROM emp 
 ORDER BY job; 

EMPNO ENAMEJOB MGR HIREDATE         SAL       COMM     DEPTNO                                             
---------- ---------- --------- ---------- --------- ---------- ---------- ----------                                             
      7788 SCOTT      ANALYST  7566 19-APR-87       3000                    20                                             
      7902 FORD       ANALYST   7566 03-DEC-81       3000                    20                                             
      7369 SMITH      CLERK        7902 17-DEC-80        800                    20                                             
      7876 ADAMS     CLERK       7788 23-MAY-87       1100                    20                                             
      7934 MILLER     CLERK       7782 23-JAN-82       1300                    10                                             
      7900 JAMES      CLERK       7698 03-DEC-81        950                    30                                             
      7566 JONES      MANAGER 7839 02-APR-81       2975                    20                                             
      7782 CLARK      MANAGER  7839 09-JUN-81       2450                    10                                             
      7698 BLAKE      MANAGER  7839 01-MAY-81       2850                    30                                             
      7839 KING         PRESIDENT        17-NOV-81       5000                    10                                             
      7499 ALLEN      SALESMAN  7698 20-FEB-81       1600        300         30                                             
      7654 MARTIN     SALESMAN 7698 28-SEP-81       1250       1400         30                                             
      7844 TURNER     SALESMAN7698 08-SEP-81       1500          0         30                                             
      7521 WARD       SALESMAN   7698 22-FEB-81       1250        500         30                                             

14 rows selected.

Go Back

Go Back