mysql - create table with default current date datetime field

other
voted: 0
vote
mysql timestamp default datetime

Setting default datetime using CURRENT_TIMESTAMP with mysql

CREATE TABLE IF NOT EXISTS `employees`.`topic` (
  `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  `name` VARCHAR(255) NOT NULL,
  `created` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE INDEX `id_UNIQUE` (`id` ASC))
ENGINE = InnoDB;
working url: not entered
version: not entered
Leave a Comment:
Characters left:
No comments yet.