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


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM