別のテーブルの値を使用して、ある日付をmysqlテーブルから更新する必要があります。私は私のMySQLサーバ上でこれを実行やろうとしている2つのテーブルを使用した更新
、
更新
update wp_posts post
join wp_postmeta meta
on post.ID = meta.post_id
set post.post_date = meta.false_date
where meta.false_date <> '';
しかし、私は、端末
エラーに次のエラーを取得する
ERROR 1064 (42000): 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 wp_posts post, wp_postmeta meta where post.ID = meta.post_id and meta.false' at line 1
メタ
| 7647 | 1483 | false_date | 2016-12-30
のSQL文
update wp_posts post
join wp_postmeta meta
on post.ID = meta.post_id
set post.post_date = meta.false_date
where meta.false_date <> '';
エラー2
ERROR 1054 (42S22): Unknown column 'meta.false_date' in 'where clause'
私が間違って何をしているのですか?
何か助けていただければ幸いです。
Jaster
エラーメッセージは自明です。 – Strawberry