简体   繁体   中英

TimeStamp and Datetime?

I have use a timestamp on an 'updated' field, every time a new field is created or updated I want it to get the current timestamp. After I create a field I get 00-00 00:00:00 even though I only pass '' on creation. How do I fix it?

updated timestamp       on update CURRENT_TIMESTAMP

pass null in the insert statement

SQLFiddle example

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM