1.使用sql只查询一次
2.我自己的sql:
UPDATE guideline_news
SET content = (
SELECT
content
FROM
guideline_news
WHERE
id = 16
)
WHERE
id > 16
备注:
这个sql报错:[Err] 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 'SELECT content FROM guideline_news WHERE id=16 WHERE id>16' at line 1
update guideline_news set content =(select content from (select * from guideline_news) a where a.id = 16) where id>16;