我正在使用下面的插入查询为所有 wordpress 帖子添加自定义文件,但是出现 Sql 语法错误我不知道我在哪里做错了
INSERT INTO wp_postmeta (post_id, meta_key, meta_value)
SELECT ID AS post_id, 'CustomField'
AS meta_key 'MyValue AS meta_value
FROM wp_posts WHERE ID NOT IN
(SELECT post_id FROM wp_postmeta WHERE meta_key = 'CustomField')
'' AND post_type = 'post';