zoukankan      html  css  js  c++  java
  • MySQL中 1305-FUNCTION liangshanhero2.getdate does not exit 问题解决

    /**

    *author blovedr

    *功能:1305-FUNCTION liangshanhero2.getdate does not exit 问题解决

    *日期: 2018年8月16日   10:35

    *注释:  学习数据库MySQL的点点记录, 谢谢网上各位大神分享经验与资料, 欢迎大神批评与交流。

    */

    1305-FUNCTION liangshanhero2.getdate does not exit

    2018815   15:44

    问题:

    1305-FUNCTION liangshanhero2.getdate does not exit

     

    1305-FUNCTION liangshanhero2.getdate不退出(不存在)

     

     

     

    datetime示例

     

    datetime_SQLServer中示例      2018.8.15   16:02

     

    drop table spname

    create table spname( bir datetime )

     

     

     

    --SQLServer      为我们提供了一个专门的时间函数

    --getdate()

    insert into spname values( getdate() )

          自注:SQLServer中以上sql语句可以运行出正确当前系统时间,格式如:2009-12-15  10:24:26. 140     MySQL这个语句是会报错      2018.8.15   16:18                        

     

     

     

    1305  问题解决

    -- MySQL

    --now()

    insert into spname values( now() )

          自注:OK      MySQL中得到系统当前时间的函数,格式如: 2018-08-15 16:19:55   ,  此时可以在MySQL中运行得到正确的系统当前时间。      2018.8.15   16:21       

     

    select * from spname

  • 相关阅读:
    Beta 冲刺(1/7)
    福大软工 · 第十次作业
    11111111
    101
    7
    6
    5
    4
    p
    b2
  • 原文地址:https://www.cnblogs.com/blovedr/p/9485797.html
Copyright © 2011-2022 走看看