I want to update rows from one table to another, both have same structure and i use this query
UPDATE bh_master_ritesh_stock AS st
SET st.tag_uid = apprv.tag_uid ,st.stk_id = apprv.stk_id
FROM bh_stock_approval AS apprv
WHERE st.stock_id = apprv.stock_id
but it gives me this error,
You have an error in your SQL syntax; check the manual that corresponds to
your MySQL server version for the right syntax to use near
'FROM bh_stock_approval as apprv WHERE st.stock_id = apprv.stock_id' at line 3
where is my mistake? or am I using wrong query?