I have created a created_time
field with BIGINT
in a MySQL 5.7 table, now I want to auto generate a Unix millisecond timestamp when I insert a record. Is it possible to do this? I have tried the code below but it failed:
ALTER TABLE db.video_info MODIFY COLUMN created_time bigint(20)
DEFAULT (ROUND(UNIX_TIMESTAMP(CURTIME(4)) * 1000)) NULL;