您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

mysql保存当前时间精确到秒_MySQL

2024/2/17 18:04:09发布18次查看
用mybatis在mysql中保存字段精确到秒需要两个步骤。
1、现在mysql中将时间字段改为datetime 例如:alter table tablename add pay_date datetime comment '精确到秒的时间'
2、在sql语句中直接用now(). 例如: update tj_record set is_customerhandover ='1' and customer_handover_date = now() where id = #{record_id}
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product