sql函数问题
SELECTGETDATE()ASCurrentDateTime我调用getdate()这个函数时,为什么总是报错:#1305-FUNCTIONyyc.GETDATEdo...
SELECT GETDATE() AS CurrentDateTime
我调用getdate()这个函数时,为什么总是报错:
#1305 - FUNCTION yyc.GETDATE does not exist
数据库名叫yyc 展开
我调用getdate()这个函数时,为什么总是报错:
#1305 - FUNCTION yyc.GETDATE does not exist
数据库名叫yyc 展开
2个回答
展开全部
GETDATE () 是 SQL Server 的函数。
MySQL 里面,用 NOW () 函数
mysql> use test
Database changed
mysql> SELECT GETDATE() AS CurrentDateTime
-> ;
ERROR 1305 (42000): FUNCTION test.GETDATE does not exist
mysql> select now() as CurrentDateTime;
+---------------------+
| CurrentDateTime |
+---------------------+
| 2011-09-23 15:18:02 |
+---------------------+
1 row in set (0.00 sec)
MySQL 里面,用 NOW () 函数
mysql> use test
Database changed
mysql> SELECT GETDATE() AS CurrentDateTime
-> ;
ERROR 1305 (42000): FUNCTION test.GETDATE does not exist
mysql> select now() as CurrentDateTime;
+---------------------+
| CurrentDateTime |
+---------------------+
| 2011-09-23 15:18:02 |
+---------------------+
1 row in set (0.00 sec)
追问
非常感谢
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询