【发布时间】:2012-05-08 07:27:12
【问题描述】:
Wordpress 在其 *wp_posts* 表中有 2 列
- post_date(实际发布日期)
- post_modified(上次修改帖子的时间)
我想用 post_date 的值更新/更改/替换 post_modified 值,但除了知道我需要一个 sql 查询之外不知道如何做。
【问题讨论】:
标签: sql wordpress sql-update
Wordpress 在其 *wp_posts* 表中有 2 列
我想用 post_date 的值更新/更改/替换 post_modified 值,但除了知道我需要一个 sql 查询之外不知道如何做。
【问题讨论】:
标签: sql wordpress sql-update
可能是这样的:
UPDATE wp_posts
SET post_modified= post_date
【讨论】:
Update wp_posts
set w1.post_modified = w2.post_date
from wp_posts w1, wp_posts w2
where w1.IdCol = w2.IdCol
【讨论】: