Cannot set order_time: incompatible types, cannot convert java.sql.Timestamp to java.lang.String Query

Cannot set order_time: incompatible types, cannot convert java.sql.Timestamp to java.lang.String Query

无法设置顺序时间:不兼容的类型,无法转换java.sql.Timestamp时间戳到java.lang.String语言查询

我的问题是:在数据库中date类型刚开始设置为datetime,默认格式为:0000-00-00 00:00:00而我想默认当前时间截更新数据

所以我更改为timestamp---报错的原因是我默认的格式为0000-00-00 00:00:00,所以不能转换而报错

修改方法:把timestamp--默认值改为:current-timestamp

posted @ 2020-06-12 11:08  羊咩y  阅读(3511)  评论(1编辑  收藏  举报