Search
 
SCRIPT & CODE EXAMPLE
 

SQL

mysql on update current_timestamp

Press CTRL+C to copy CREATE TABLE t1 (
  ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  dt DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);
Comment

mysql change timestamp on update

ALTER TABLE whatevertable
     CHANGE whatevercolumn 
            whatevercolumn TIMESTAMP NOT NULL
                           DEFAULT CURRENT_TIMESTAMP 
                           ON UPDATE CURRENT_TIMESTAMP;
Comment

PREVIOUS NEXT
Code Example
Sql :: datediff in sql server 
Sql :: concatenate two strings in sql 
Sql :: apex set debug level 
Sql :: mysql on duplicate key update 
Sql :: add column in sql server 
Sql :: mysql drop database 
Sql :: insert current date sql 
Sql :: row number mssql 
Sql :: sql waitfor 
Sql :: spring where to put the data sql 
Sql :: sql select last id 
Sql :: mysql remove html tag 
Sql :: sql query to get the number of rows in a table 
Sql :: mysql update join 
Sql :: mysql email validation 
Sql :: import all databases mysql 
Sql :: mariadb mysql root access denied 
Sql :: 1) PostgreSQL DESCRIBE TABLE using psql 
Sql :: mysql update with join 
Sql :: add bool column in sql 
Sql :: sql convert float to string 
Sql :: incompatible sql_mode=only_full_group_by 
Sql :: mysql add column to table 
Sql :: oracle login as sysdba 
Sql :: oracle sql concatenate results into string 
Sql :: mysql get first n characters of string 
Sql :: between sql server 
Sql :: enable foreign key checks postgres 
Sql :: add time to date sql 
Sql :: firebase query timestamp 
ADD CONTENT
Topic
Content
Source link
Name
5+9 =