0
UPDATE icmsc100 SET codigo='test'
FROM icmsc100
INNER JOIN icms307
ON icms307.ajusteDeCodigo = icmsc100.codigoItem;

I'm trying to use it this way, but it's returning an error, how should it be done?

Error #1064 - Syntax Error

Don't Panic
  • 41,125
  • 10
  • 61
  • 80
  • phpmyadmin is the web interface for (AFAIK) MySQL databases. The error tells that your sql command neither fits MySQL nor the standard SQL notation. Search a bit here in Stackoverflow or Google and you will find the answer with e. g. `mysql update join other table` – BitLauncher Feb 22 '22 at 14:57
  • Does this answer your question? [MySQL Update Inner Join tables query](https://stackoverflow.com/questions/8057565/mysql-update-inner-join-tables-query) – Don't Panic Feb 22 '22 at 16:44

1 Answers1

1

You can update the data with the Inner Join In MYSQL as below.

UPDATE icmsc100 
INNER JOIN icms307 
ON icms307.ajusteDeCodigo = icmsc100.codigoItem
SET codigo='test';
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Feb 22 '22 at 17:04