我有一個 mysql 資料庫,我想用特定日期更改“修改”日期。
在“修改列我有幾個日期:”2016-08-15“2015-05-08”等等......現在我想用唯一的日期更改所有這些日期:“2021-12-31”
UPDATE jos_content SET modified = replace(modified, 'any date here', '2021-12-31’)
我該怎么做?
uj5u.com熱心網友回復:
如果我猜對了,這會將所有日期設定為 2021-12-31
UPDATE jos_content
SET modified = '2021-12-31’
uj5u.com熱心網友回復:
UPDATE jos_content
SET modified = '2021-12-31'
where modified in ('date1','date2'...)
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/400181.html
下一篇:java.sql.SQLIntegrityConstraintViolationException:鍵“login.PRIMARY”的重復條目“null”
