TIMESTAMP data type in MySQLA TIMESTAMP data type allows you to record a date and time like DATETIME data in 'YYYY-MM-DD HH:MM:SS' format. It has the following properties:
1. The current date and time is assigned to the first TIMESTAMP column in a table if not listed in an INSERT statement. 2. The first TIMESTAMP column in a table will be assigned with the current date and time, if it is not listed in an UPDATE statement. 3. If a TIMESTAMP column is assigned with NULL, the current date and time will be persisted to this column. 4. You can turn off the default current date and time on INSERT by defining the column with "DEFAULT 0".
|