Question: Write Procedural code for SQL, MYSQL DBMS, to perform the following tasks and submit your code in one PDF file with enough comments. 1)

Write Procedural code for SQL, MYSQL DBMS, to perform the following tasks and submit your code in one PDF file with enough comments. 1) Create a function that will return the second maximum salary, integer attribute, from the Employees table, where the table schema is Employees(eid, ename, dno, job, salary). You have to use CURSOR to solve this task. 2) Create a trigger that will archive the update process on the customer s' balance, in Customer table, only into the BalanceUpdate table. The trigger will not archive any update of the other attributes in the Customer table. For your solution consider the following schemas: - Customer(cid, cname, caddress, accountNo, accountType, balance) - BalanceUpdate(user, updateTime, cid, accountNo, oldBalance, newBalance)
Step by Step Solution
3.42 Rating (165 Votes )
There are 3 Steps involved in it
1 fuction secondMaxsalary local sql SELECT salar... View full answer
Get step-by-step solutions from verified subject matter experts
