You are on page 1of 2

Name: Dixon B.

Delos Santos
Course/Set: BSIT – 2C

Module 03 – Lesson 01 Application

1. Create relation emptrans.

2. Create a stored procedure.

3. Execute the Stored Procedure


a. CALL EmployeeTransaction(1,200,2);
b. CALL EmployeeTransaction(2,300,3);
c. CALL EmployeeTransaction(3,400,4);

4. Execute the Stored Procedure CALL EmployeeTransaction(1,-75,2);

What happen to the account of employee#1? Why?


- As 'dAmount' now has a value of -75, every transaction that has been given to the procedure will result in a
-75 deduction from Employee#1's current balance.
5. Execute the Stored Procedure CALL EmployeeTransaction(2,500,2);

What happen to the account of employee#2? Why?


- For each transaction that has been given to procedure, the new value for "dAmount" is 500 and it is not
negative, therefore it will increase Employee#2's current balance.

You might also like