当前位置:首页 > 数据库 > 正文内容

被Navicat坑哭的日常,版本问题

root4年前 (2021-06-09)数据库888

mysql5.7

DROP TABLE IF EXISTS `xxx_copy1`;
CREATE TABLE `xxx_copy1`  (
 `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
 `numip` int(10) UNSIGNED NOT NULL,
 `time` timestamp(0) DEFAULT NULL,
 `status` int(2) DEFAULT 1,
 PRIMARY KEY (`id`) USING BTREE,
)  CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;


这个里面的 `time` timestamp(0) DEFAULT NULL,在mysql5.7中不是一个正确的语法

可以这么写: `time` timestamp(0)  NULL DEFAULT NULL

或者这么写  `time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP


因为我的Navicat版本问题,导出这个数据表,在导入其他的库中一直失败出现问题。极其尴尬,同事极力让我更换其他版本的Navicat



扫描二维码推送至手机访问。

版权声明:本文由一叶知秋发布,如需转载请注明出处。

本文链接:https://zhiqiu.top/?id=121

分享给朋友:

相关文章

mysql启动失败 日志InnoDB: Ignoring the redo log due to missing MLOG_CHECKPOINT between the checkpoint 3485

mysql报错Ignoring the redo log due to missing MLOG_CHECKPOINT betweenmysql版本:5.7.33系统版本:ubuntu16.04由于电脑突然关闭,跑在VMware里面的mys...

mysql 导出csv格式数据

mysql -e "select * from newsdb.t_hk_stock_news where id <100  ...

postgresql 导入导出sql 文件

pg_dump  -h localhost -U postgres -t tablename databasename >./test.sql导出 -t 表名  psql -d test1 -U...

postgresql 的安装使用

安装centos系统 9.6版本# Install the repository RPMsudo yum install -y https://download.postgresql.org/pub/repos/yum/repor...

postgresql修改数据存储位置

postgresql修改数据存储位置

最近公司提供了一台新的服务器,同时有一个盘是ssd。同时为了测试postgresql的性能,将数据放置到ssd上系统centos7.9 数据库postgresql-9.6首先停掉数据库systemctl stop pos...