在資料表設立一個修改資料的時間欄位
1 | create table if not exists sound( |
default current_timestamp 預設建立時間為現在時間
on update current_timestamp 在修改時,修改為現在時間
取得現在時間
函式 | 結果 |
---|---|
CURDATE() | 2018-06-16 |
CURTIME() | 12:49:51 |
CURRENT_TIMESTAMP() | 2018-06-16 12:50:04 |
NOW() | 2018-06-16 12:50:04 |
UNIX_TIMESTAMP() | 1529124630 |