[Solved] MySQL Error 1064 (42000) when running UPDATE query [closed]


In this:

UPDATE MATERIAL_MASTER 
SET MST_NAME='XXX' MAT_DESC='YYY' 
MAT_TYPE='Raw Material' 
MAT_GRP='H' UOM='kg' CURRENCY='inr'
ENTITY_ASSEMBLED='A'
where idMATERIAL_MASTER=3;

You’re missing commas between fields in SET zone.

The correct query is:

UPDATE MATERIAL_MASTER 
SET MST_NAME='XXX', MAT_DESC='YYY', 
MAT_TYPE='Raw Material', 
MAT_GRP='H', UOM='kg', CURRENCY='inr',
ENTITY_ASSEMBLED='A'
where idMATERIAL_MASTER=3;

0

solved MySQL Error 1064 (42000) when running UPDATE query [closed]