Execution Error SQL_ERROR_INFO: near “.“: syntax error

created at 09-26-2021 views: 5

I made the simplest mistake when I was doing SQL problems today.

update  salaries set salaries.salary = salaries.salary *1.1 
where salaries.emp_no = (select emp_no from emp_bonus ) and to_date = '9999-01-01'

Then idea reported an error. The error was near ".": syntax error. In fact, when I update the salary table, there is no need to add . to index the elements in the table, just call it directly.


Just change it this way.

update  salaries set salary = salary *1.1 
where emp_no = (select emp_no from emp_bonus ) and to_date = '9999-01-01'
created at:09-26-2021
edited at: 09-26-2021: