Posted By

navblue on 05/04/12


Tagged

mysql default timestamp modified created


Versions (?)

mysql create modify default timestamp


 / Published in: MySQL
 

add created datetime and modified timestamp columns to table

  1. ALTER TABLE `table` ADD `created` DATETIME NOT NULL ,
  2. ADD `modified` TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP

Report this snippet  

You need to login to post a comment.