sql

1. MySQL

create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
 `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',

2. PG

  "create_time" timestamp(6) DEFAULT ('now'::text)::timestamp(6) with time zone,
更新操作好像要用到触发器,待补充
原文地址:https://www.cnblogs.com/JackShi/p/15428805.html