GTU MCA RDBMS Set 10 Solution: Cursor FOR Loop Function and Procedure for Total Salary in Oracle

Official Set 10 Set 10 — EMPLOYEE: Cursor FOR Loop in a Function and a Procedure (Total Salary) Explicit cursor Cursor FOR loop Cursor parameter Function → procedure UPPER / LIKE Subject MC01094031 RDBMS Tool Oracle 10g or above Questions 2 Status Question list: official GTU PDF Source check: Both tasks are copied from the official GTU PDF. 'Names begin with that character' is applied to the first name (fname) ; use lname in the cursor if your instructor means the surname. Sample data is illustrative. On this page Introduction Learning objectives Original question list Database schema Prerequisites Table creation & sample data Solutions Important concepts Common mistakes Viva questions Summary Download script Related practicals Introduction SUM(salary) would answer this in one SQL statement, but the purpose of the practical is to understand cursors. A cursor FOR loop visits each employee row and adds the salary to a running total. The second task turns the function into ...