Create Unix timestamp in MySQL

How to create unix timestamp in MySQL? I know that the type matters INT

and the value NULL

, but I need to fill it with the current time in the format, for example: 1343782742

+3


source to share


1 answer


use UNIX_TIMESTAMP(date)

SELECT UNIX_TIMESTAMP(NOW())

      



+8


source