Skip to content
Advertisement

Promote a clerk if his salary is greater than 1000 and update his salary by 10%

Write a Parameter Cursor program that promotes CLERK who earn more than 1000 to SR CLERK and increase the salary by 10%. Pass CLERK as a parameter to the Cursor. Use cursor with Update Clause.

My code:

My code does the work but I don’t find it correct so can someone suggest an alternative?

Advertisement

Answer

You can create a small procedure and pass v_job and update it in a single update statement rather than using cursor

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement