1. Execute the SQL as follows:
SQL
UPDATE `xx_themes` SET `is_original` = (SELECT `is_original` FROM `xx_themes` WHERE `id` = '237') WHERE `id` = 248
2. Error: 1093 – You can’t specify target table ‘xx_themes’ for update in FROM clause. See Figure 1.

SQL
UPDATE `xx_themes` SET `is_original` = (SELECT `is_original` FROM `xx_themes` WHERE `id` = '237') WHERE `id` = 248
> 1093 - You can't specify target table 'xx_themes' for update in FROM clause
> 时间: 0s
3. Reference: https://dev.mysql.com/doc/refman/5.7/en/update.html . In MySQL, you cannot modify the same table used in the SELECT part. You can join the table to itself, which causes MySQL to treat the table as two different things, thereby allowing destructive changes. See Figure 2.

SQL
UPDATE `xx_themes` AS t
INNER JOIN `xx_themes` AS f ON t.id=248 and f.id=237
SET t.is_original = f.is_original
