MySQL Forums
Forum List  »  Newbie

ERROR: Error 1067: Invalid default value for 'date_created'
Posted by: Larry Robinson
Date: September 14, 2014 06:19AM

CREATE TABLE IF NOT EXISTS `affablebean`.`customer_order` (
`idcustomer` TIMESTAMP NULL,
`amount` DECIMAL(6,2) UNSIGNED NOT NULL,
`date_created` TIMESTAMP NOT NULL,
`confirmation_number` INT UNSIGNED NOT NULL,
`customer_idcustomer` INT UNSIGNED NOT NULL,
PRIMARY KEY (`amount`),
INDEX `fk_customer_order_customer_idx` (`customer_idcustomer` ASC),
CONSTRAINT `fk_customer_order_customer1`
FOREIGN KEY (`customer_idcustomer`)
REFERENCES `affablebean`.`customer` (`idcustomer`)
ON DELETE NO ACTIONCREATE TABLE IF NOT EXISTS `affablebean`.`customer_order` (
`idcustomer` TIMESTAMP NULL,
`amount` DECIMAL(6,2) UNSIGNED NOT NULL,
`date_created` TIMESTAMP NOT NULL,
`confirmation_number` INT UNSIGNED NOT NULL,
`customer_idcustomer` INT UNSIGNED NOT NULL,
PRIMARY KEY (`amount`),
INDEX `fk_customer_order_customer_idx` (`customer_idcustomer` ASC),
CONSTRAINT `fk_customer_order_customer1`
FOREIGN KEY (`customer_idcustomer`)
REFERENCES `affablebean`.`customer` (`idcustomer`)
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB

SQL script execution finished: statements: 13 succeeded, 1 failed

Fetching back view definitions in final form.
Nothing to fetch

ON UPDATE NO ACTION)
ENGINE = InnoDB

SQL script execution finished: statements: 13 succeeded, 1 failed

Fetching back view definitions in final form.
Nothing to fetch

Options: ReplyQuote


Subject
Written By
Posted
ERROR: Error 1067: Invalid default value for 'date_created'
September 14, 2014 06:19AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.