作者热门文章
- Java 双重比较
- java - 比较器与 Apache BeanComparator
- Objective-C 完成 block 导致额外的方法调用?
- database - RESTful URI 是否应该公开数据库主键?
我正在尝试将数据库从 mysql 移植到 infinidb。但是在移植时出现上述错误(在标题中描述)。
`CREATE_TIMESTAMP` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
在 mysql 中有效,但在 infinidb 中无效。错误是:错误代码:138。 infinidb 不支持语法或数据类型。任何帮助将不胜感激。
最佳答案
这是您尝试的完整 SQL 语句吗?我能够使用:
create table test (`CREATE_TIMESTAMP` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP);
这是控制台输出
[root@centos6 bin]# idbmysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 12
Server version: 5.1.73 Calpont InfiniDB 4.5 Alpha
Copyright (c) 2014, InfiniDB, Inc. and/or its affiliates. All rights reserved.
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
InfiniDB is a registered trademark of InfiniDB, Inc. and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> use test;
Database changed
mysql> create table test (`CREATE_TIMESTAMP` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP);
Query OK, 0 rows affected (0.00 sec)
mysql> describe test;
+------------------+-----------+------+-----+-------------------+-----------------------------+
| Field | Type | Null | Key | Default | Extra |
+------------------+-----------+------+-----+-------------------+-----------------------------+
| CREATE_TIMESTAMP | timestamp | NO | | CURRENT_TIMESTAMP | on update CURRENT_TIMESTAMP |
+------------------+-----------+------+-----+-------------------+-----------------------------+
1 row in set (0.00 sec)
mysql>
如果这不起作用或者您正在以不同的方式尝试语法,请告诉我。另外,您正在尝试使用哪个版本的 InfiniDB?
谢谢!
关于mysql - Infinidb -"` CREATE_TIMESTAMP` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP"给出错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21829271/
我正在尝试将数据库从 mysql 移植到 infinidb。但是在移植时出现上述错误(在标题中描述)。 `CREATE_TIMESTAMP` TIMESTAMP NOT NULL DEFAULT CU
我是一名优秀的程序员,十分优秀!