zoukankan      html  css  js  c++  java
  • MySQL 获取当前时间戳

    1. 秒级别时间戳

    自19700101 00:00:00以来按秒算,SQL如下:

    mysql> select unix_timestamp(now());
    +-----------------------+
    | unix_timestamp(now()) |
    +-----------------------+
    |            1541604376 |
    +-----------------------+
    1 row in set (0.00 sec)

        1
        2
        3
        4
        5
        6
        7

    2. 当前时间戳

    mysql> select current_timestamp();
    +---------------------+
    | current_timestamp() |
    +---------------------+
    | 2019-01-04 20:37:19 |
    +---------------------+
    1 row in set (0.00 sec)
    ————————————————
    版权声明:本文为CSDN博主「LittleLawson」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
    原文链接:https://blog.csdn.net/liu16659/article/details/83834071

  • 相关阅读:
    架构设计
    第七章
    第六章
    第五章
    第四章
    第三章
    第二章
    第一章
    链表中环
    实现链表中的部分翻转
  • 原文地址:https://www.cnblogs.com/tiancai/p/11612591.html
Copyright © 2011-2022 走看看