Search
 
SCRIPT & CODE EXAMPLE
 

SQL

sql auto update dupdated_at

ALTER TABLE t1
ADD COLUMN created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
ADD COLUMN updated_at DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
Comment

PREVIOUS NEXT
Code Example
Sql :: mysql command line connect 
Sql :: find names starting with vowels in sql 
Sql :: truncate table mysql 
Sql :: sqlite3 now 
Sql :: crontab every month 
Sql :: oracle turn off constraint 
Sql :: add sequence postgres 
Sql :: oracle user last connection date 
Sql :: oracle first day of last year 
Sql :: how to show all users in mysql 
Sql :: PLS-00225 type 
Sql :: sql select table header 
Sql :: postgres read table structure 
Sql :: how to list function in psql 
Sql :: mariadb show tables 
Sql :: how to check data type in sql server 
Sql :: pyodbc connect to sql server 
Sql :: SELECT User,Host FROM mysql.user; 
Sql :: get current year sql 
Sql :: check database size in mysql 
Sql :: mysql add column default value 
Sql :: snowflake alter column data type 
Sql :: how to start mysql in terminal 
Sql :: Sql Server join multiple column values and separate with comma 
Sql :: list all tables and columns in postgresql 
Sql :: how to check mysql version in xampp 
Sql :: mysql show data from table 
Sql :: sql left join exists 
Sql :: postgresql if null then 0 
Sql :: show tables in schema oracle 
ADD CONTENT
Topic
Content
Source link
Name
1+6 =