mysql automatically store record creation timestamp

前端 未结 5 872
清歌不尽
清歌不尽 2020-11-30 03:39

Is there some way mysql can store timestamp automatically in a record row whenever that it is created. I was trying to use timestamp(data type) with current_timestamp as def

5条回答
  •  星月不相逢
    2020-11-30 04:20

    SELECT * FROM test WHERE timestamp >= CURDATE() AND timestamp < CURDATE() + INTERVAL 1 DAY ORDER BY timestamp;

提交回复
热议问题