Skip to main content
Admissions guidance, study banks, and career tools — get started on Shalyam

Cursor: Give a Raise

Write a procedure that uses a cursor to give a 10% raise to every employee earning less than 50000, one row at a time.

Table schema

Employees(id INT PRIMARY KEY, name VARCHAR(50), salary INT)

Sample data

id | name | salary
1 | Amy | 40000
2 | Ben | 60000
3 | Cara | 45000

Discussion

No discussions yet.

Rewards · v2.1

Get Exclusive Insights with Every Issue

Join Shalyam Newsletter

Stay ahead in education, research, and innovation—straight to your inbox.