SQL Query To Increase Salary By Percentage For All Employees In A Table


Sometimes we may need to increase the current column value by Percentage. The very good example is Salary in an organization. We need to update the salary of each employee based on the Hike Percentage.

Increasing Salary By Percentage

In this example, lets assume the Hike percentage is equal for all employees, and I am counting 15 Percentage as Hike. Lets create the table and insert some records.

CREATE TABLE [Details].Employees
	FullName VARCHAR(50), 
	Salary FLOAT

Inserting records into the Employees Table,

INSERT INTO [Details].Employees VALUES 
	'Saravana Kumar', 
	'Karthik K',

Lets select all the records from the table Employee.

SELECT * FROM [Details].Employees
Fig.1 All Records from the table Employee

Now lets update the salary column by 15 percentage for all records.

UPDATE Details.Employees
SET Salary = salary * 1.15

Select all the record from the table,

Fig. 2 Salary updated after applying increment


In this article, we discussed about how to increase the value by applying some percentage. I hope you all got some idea and found this article useful. Please share your feedback in the comment section.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Website Built with WordPress.com.

Up ↑

%d bloggers like this: