爲什麼我得到一個錯誤信息,當我導入SQL創建MySQL工作臺?MySQL的工作臺到phpMyAdmin:0000-00-00 00:00:00 - 無效的默認值
SET @[email protected]@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @[email protected]@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @[email protected]@SQL_MODE, SQL_MODE='TRADITIONAL';
-- -----------------------------------------------------
-- Table `$type`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `type` (
`type_id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT ,
`name` VARCHAR(255) NULL DEFAULT NULL ,
`created_on` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' ,
`updated_on` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ,
PRIMARY KEY (`type_id`))
ENGINE = MyISAM
AUTO_INCREMENT = 1
DEFAULT CHARACTER SET = utf8;
SET [email protected]_SQL_MODE;
SET [email protected]_FOREIGN_KEY_CHECKS;
SET [email protected]_UNIQUE_CHECKS;
錯誤信息,
#1067 - Invalid default value for 'created_on'
有什麼不對這個值 - 0000-00-00 00:00:00
嘗試從'timestamp'改變它'datetime'。 – 2012-02-26 18:38:41
嘗試過,但同樣的問題... :-( – laukok 2012-02-26 18:42:05
可以在phpmyadmin的一個問題本身? – laukok 2012-02-26 18:42:39