I am trying to update employee salary by using this query. Why I am getting unexpected token:near line 1 in JPA Query error.
@Query("update employee set sal= sal + 2000 where salary < :sal")
void updateEmployeeSalary(@Param("sal") Long sal)
And this is my service method
List<Employee> updateSalary(Long sal){
repo.updateEmployeeSalary(sal);
return repo.findAll();
}