We need a raise

Report a typo

Going back to the employee table, let's say we want to increase the salary of all employees by 1500 if they earn less than or equal to 13000. We have to filter by this criterion first and then update.

Employee datatable

Select a correct code snippet that will successfully perform the update.

A)

query.filter(salary == 13000).update({"salary": Employee.salary + 1500})

B)

query.filter(Employee.salary >= 13000).update({salary: Employee.salary - 1500})

C)

query.filter(Employee.salary <= 13000).update({"salary": Employee.salary + 1500})

D)

query.filter(Employee.name <= 13000).update({"salary": Employee.salary + 1500})
Select one option from the list
___

Create a free account to access the full topic