Hello All, I need to generate a simple script according to the following: "Using only one update write query to update a salary by 10% for salaries below 100k and 15% for salaries above 100k"
TIA
grin2dan 0 Newbie Poster
Recommended Answers
Jump to PostThis should work for you.
update employee set salary = case when salary < 100000 then salary * 1.10 when salary >= 100000 then salary * 1.15 End;
All 3 Replies
Reply to this topic Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.