1
I’m new to the forum and SQL. I use the Mysql Workbench DBMS to try to learn the syntax. Consulting a tutorial site, went to perform an update using a select, follows command line:
update actor
set salario = salario * 1.1
where salario = (select min(salario) from actor)
But it returns me a mistake and I have no idea how to solve:
"Error Code: 1093. You can’t specify target table 'actor' for update in from clause"
I did select separately to see if I was wrong in the syntax, but ran smoothly.
Thank you!
What about the error? It would be interesting to explain the reason that triggers such error.
– user28595
There was a boy who had already commented, but deleted, I will edit the answer.
– Guilherme Lopes
It was me, but there was no basis, I did not find in the documentation this information.
– user28595
I was right what you had said, but I’ll update it so other people know too.
– Guilherme Lopes
Thank you very much!
– Mateus Binatti
You guys recommend some cool website for me to learn?
– Mateus Binatti