zoukankan      html  css  js  c++  java
  • mysql保存当前时间精确到秒

       用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}



查看全文
  • 相关阅读:
    java 各个文件夹的含义
    对称加密 & 非对称加密
    leetcode 155 最小栈
    leetcode 53 最大自序列和
    leetcode 146 LRU 缓存机制
    notebook 开启 有限元学习
    leetcode 232 用栈实现队列
    LINUX装机问题:无法使用“Ctrl+Alt+[F1~F6]”快捷键切换到终端
    JAVA笔记4-static关键字
    C++构造函数、析构函数、虚析构函数
  • 原文地址:https://www.cnblogs.com/ldxsuanfa/p/10842351.html
  • Copyright © 2011-2022 走看看