Skip to main contentSkip to solution

Given Table - 'Employee'

Attributes - EmployeeID, Name, Salary

Identify the correct query for performing the following operations:

Increasing the salary by 40% of all employees.

Solution

✅ Correct Option: 3

SQL changes existing rows with the UPDATE statement, so the command must begin with UPDATE, not MODIFY (which is not a valid SQL command for this).

Increasing a value by 40% means the new salary is the old salary plus 40% of it: SALARY+0.40×SALARY=SALARY×1.40\text{SALARY} + 0.40 \times \text{SALARY} = \text{SALARY} \times 1.40

So the query is: UPDATE EMPLOYEE SET SALARY = SALARY*1.40;

Since there is no WHERE clause, it applies to all employees.


Option 1: SALARY*0.40 sets the salary to 40% of the old value, which is a decrease and not an increase.

Options 2 and 4: MODIFY is not the SQL command for changing row data (ALTER TABLE ... MODIFY changes column definitions, not values).

Keyboard Shortcuts

  • Left arrow: Previous question
  • Right arrow: Next question
  • S key: Jump to solution
  • Q key: Jump to question