簡體   English   中英

Mysql DDL在本地Wamp上有效,但不能在在線服務器上導入

[英]Mysql DDL works on local wamp but does not import on online server

我在localhost wamp MySQL服務器上使用此架構,並且工作正常:

CREATE TABLE `tblcustomers` (
`customerid` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`customername` varchar(50) NOT NULL,
`customerphone` varchar(11) DEFAULT NULL,
`customeraddress` varchar(255) DEFAULT NULL,
`registrationdate` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
UNIQUE KEY `credid` (`customerid`),
UNIQUE KEY `credname` (`customername`),
UNIQUE KEY `customerid` (`customerid`)
) ENGINE=InnoDB AUTO_INCREMENT=110 DEFAULT CHARSET=latin1;

MySQL說:文檔

#1067 - Invalid default value for 'registrationdate' 

當我在聯機服務器上導入轉儲文件時,會收到上述消息。 怎么處理呢?

registrationdate數據類型從DATETIME更改為TIMESTAMP ,您應該通過

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM