0% found this document useful (0 votes)
11 views1 page

Test Update

The document creates two tables: TEST_UPDATE, which stores employee information including ID, department, salary, and new salary, and UPDATE_MAS, which contains department IDs and their corresponding percentage increments. Several records are inserted into both tables, detailing employee salaries and department increment rates. Finally, it includes commands to commit the changes and select all records from both tables.

Uploaded by

kravishind
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views1 page

Test Update

The document creates two tables: TEST_UPDATE, which stores employee information including ID, department, salary, and new salary, and UPDATE_MAS, which contains department IDs and their corresponding percentage increments. Several records are inserted into both tables, detailing employee salaries and department increment rates. Finally, it includes commands to commit the changes and select all records from both tables.

Uploaded by

kravishind
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

CREATE TABLE TEST_UPDATE (

EMP_ID NUMBER PRIMARY KEY,


DEPARTMENT_ID NUMBER,
SALARY NUMBER,
NEW_SAL NUMBER
);

INSERT INTO TEST_UPDATE (EMP_ID, DEPARTMENT_ID, SALARY, NEW_SAL) VALUES (100, 90,
24000, 0);
INSERT INTO TEST_UPDATE (EMP_ID, DEPARTMENT_ID, SALARY, NEW_SAL) VALUES (101, 90,
17000, 0);
INSERT INTO TEST_UPDATE (EMP_ID, DEPARTMENT_ID, SALARY, NEW_SAL) VALUES (102, 90,
17000, 0);
INSERT INTO TEST_UPDATE (EMP_ID, DEPARTMENT_ID,SALARY ,NEW_SAL )
VALUES(103 ,60 ,9000 ,0 );
INSERT INTO TEST_UPDATE (EMP_ID ,DEPARTMENT_ID,SALARY ,NEW_SAL )
VALUES(104 ,60 ,6000 ,0 );
INSERT INTO TEST_UPDATE (EMP_ID ,DEPARTMENT_ID,SALARY ,NEW_SAL )
VALUES(105 ,60 ,4800 ,0 );
INSERT INTO TEST_UPDATE (EMP_ID ,DEPARTMENT_ID,SALARY,NEW_SAL) VALUES(106 ,60 ,4800
,0 );
INSERT INTO TEST_UPDATE (EMP_ID ,DEPARTMENT_ID,SALARY,NEW_SAL) VALUES(107 ,60 ,4200
,0 );
INSERT INTO TEST_UPDATE (EMP_ID ,DEPARTMENT_ID,SALARY,NEW_SAL)
VALUES(108 ,100 ,12008,0 );
INSERT INTO TEST_UPDATE(EMP_ID,DEPARTMENT_ID,SALARY,NEW_SAL)
VALUES(109 ,100 ,9000,0 );
INSERT INTO TEST_UPDATE(EMP_ID,DEPARTMENT_ID,SALARY,NEW_SAL)
VALUES(110,100,8200,0);

CREATE TABLE UPDATE_MAS (


DEPARTMENT_ID NUMBER,
PER_INCR NUMBER
);
INSERT INTO UPDATE_MAS (DEPARTMENT_ID, PER_INCR) VALUES (10, 10);
INSERT INTO UPDATE_MAS (DEPARTMENT_ID, PER_INCR) VALUES (20, 5);
INSERT INTO UPDATE_MAS (DEPARTMENT_ID, PER_INCR) VALUES (30, 15);
INSERT INTO UPDATE_MAS (DEPARTMENT_ID, PER_INCR) VALUES (40, 10);
INSERT INTO UPDATE_MAS (DEPARTMENT_ID, PER_INCR) VALUES (50, 20);
INSERT INTO UPDATE_MAS (DEPARTMENT_ID, PER_INCR) VALUES (60, 15);
INSERT INTO UPDATE_MAS (DEPARTMENT_ID, PER_INCR) VALUES (70, 5);
INSERT INTO UPDATE_MAS (DEPARTMENT_ID, PER_INCR) VALUES (80, 10);
INSERT INTO UPDATE_MAS (DEPARTMENT_ID, PER_INCR) VALUES (90, 10);
COMMIT;
SELECT * FROM TEST_UPDATE;
SELECT * FROM UPDATE_MAS;

You might also like