Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 increase

Author  Topic 

cthegraves
Starting Member

13 Posts

Posted - 2007-12-10 : 21:51:04
Choose an EEO-1 Classification: Increase all employees salaries that have: the selected EEO-1 classification by 10%.

Increase all employees salaries by 5%
Hi! I am new to SQL, but trying to teach myself. I have had lots of help from you guys and appreciate it very much. Today, I was trying to do the following:

In my table of "Employees", I have a column called classifications. I want to increase the salaries of the employees with a classification of EE0-1 by 10%, but I have not figured out to do so.

My second question is how would I increase all employees' salaries by 5%?


Anyone can help?

Thanks!

Scott

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-12-10 : 22:06:10
quote:
In my table of "Employees", I have a column called classifications. I want to increase the salaries of the employees with a classification of EE0-1 by 10%

First try to write a query to retrieve the lists of employee with classification of EE0-1. Once you are able to do that, proceed to the update salary part.

quote:
how would I increase all employees' salaries by 5%?

You will need to use an UPDATE statement. Take a look at the Books Online on the syntax for UPDATE.



KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

jezemine
Master Smack Fu Yak Hacker

2886 Posts

Posted - 2007-12-10 : 22:44:07
update employee
set salary = salary * 10
where handle='jezemine'

run this query at least 20 times - I'll let you know next pay period if it worked.


elsasoft.org
Go to Top of Page
   

- Advertisement -