Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
01-11-2010, 09:16 PM #1
- Join Date
- Jan 2010
- Thanked 0 Times in 0 Posts
Use MySQl t increase Salary by percentage
I have a table of employees that I want to give pay raises to. Part of the staff gets a 10% raise 5 employees and 12 employees gets a 5% pay raise.
I need a single query that will work for either of the groups.
01-11-2010, 09:56 PM #2
Feels like homework.
No company I know would be giving exactly 5% and 10% (especially in these times) and in any case with only 17 employees I'm sure it would be faster and easier to just go in and edit the data. Oh, and a company wouldn't care if it was done with one query or two.
And for homework, see rule 1.5 here:
So convince us it's not homework or show us that you have made an effort to solve this.
It's really not hard, honest. Here's a hint: Look at the IF( ) function.
Oh, and in any case it would help a lot to show us the fields in the table that you are using.
Be yourself. No one else is as qualified.
01-11-2010, 10:24 PM #3
- Join Date
- Jul 2002
- Vancouver, BC Canada
- Thanked 100 Times in 100 Posts