M
M
Mykola Ivashchuk2018-06-17 22:51:20
MariaDB
Mykola Ivashchuk, 2018-06-17 22:51:20

How to correctly execute UPDATE FROM?

Request:

UPDATE cms3_objects 
SET type_id= o2.type_id
FROM cms3_objects as o2

WHERE name LIKE "«UNIPAK» (Фум лента «Jumbotape»)"
  AND owner_id=21518 
  AND  o2.name LIKE "«UNIPAK» (Фум лента «Jumbotape»)" 
  AND o2.owner_id!=21518;

Mistake:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'FROM`cms3_objects`as`o2` FROM cms3_objects WHERE name LIKE "«UNIPAK» ' at line 2

Table encoding utf8_general_ci

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question