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 :: mysql record group by created date count 
Sql :: difference between super key and candidate key 
Sql :: convert varchar column to int in sql server 
Sql :: oracle tablespace tables list 
Sql :: mysql connection w3 
Sql :: update and replace mysql 
Sql :: 1396(hy00) mysql error 
Sql :: postgres regular expression replace 
Sql :: drop a recordin sql 
Sql :: print hello world in plsql 
Sql :: mysql find duplicates in same table 
Sql :: ascending order and where in sql 
Sql :: drop all tables in azure sql database 
Sql :: how to query date in sql server 
Sql :: creating postgresSQL database using the the shell 
Sql :: ERROR 1046 (3D000): No database selected 
Sql :: sql update insert and delete 
Sql :: sql create database 
Sql :: spring boot working with sql database connection 
Sql :: sql injection payload list github 
Sql :: remove foreign key constraints in postgres 
Sql :: sql query to select even numbers 
Sql :: sql number columns 
Sql :: postgres top 10 
Sql :: role "postgres" does not exist 
Sql :: null value in column violates not-null constraint 
Sql :: create table as select * from table mssql 
Sql :: mysql not defined 
Sql :: INITCAP in Oracle example 
Sql :: how to find unique element in sql 
ADD CONTENT
Topic
Content
Source link
Name
6+2 =