对于date类型字段值的更新,sql 直接写 update 表名 set 列名 = 值 where 条件 这样会报错:文字与格式字符串不匹配,date字段的更新要用to_date转一下。
正解:
update 表名
set 列名 =to_date(‘2022-03-30’,‘yyyy-mm-dd’)
where 条件
Oracle sql update date类型字段
最新推荐文章于 2025-02-15 22:58:21 发布
对于date类型字段值的更新,sql 直接写 update 表名 set 列名 = 值 where 条件 这样会报错:文字与格式字符串不匹配,date字段的更新要用to_date转一下。
正解:
update 表名
set 列名 =to_date(‘2022-03-30’,‘yyyy-mm-dd’)
where 条件