Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

ADD COLOUNS CREATED AND UPDATED AT IN MYSQL

ALTER TABLE t1
ADD COLUMN created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
ADD COLUMN updated_at DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #ADD #COLOUNS #CREATED #AND #UPDATED #AT #IN #MYSQL
ADD COMMENT
Topic
Name
7+1 =