/**
*author blovedr
*功能:1305-FUNCTION liangshanhero2.getdate does not exit 問題解決
*日期: 2018年8月16日 10:35
*注釋: 學習數據庫MySQL的點點記錄, 謝謝網上各位大神分享經驗與資料, 歡迎大神批評與交流。
*/
1305-FUNCTION liangshanhero2.getdate does not exit
2018年8月15日 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