UPDATE with INNER JOIN phpmyadmin

402 views Asked by At
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

1

There are 1 answers

1
Kajal Panda On BEST ANSWER

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';