microseconds component is removed. : TimeStamp « Data Type « SQL / MySQL






microseconds component is removed.

      
mysql>
mysql>
mysql> CREATE TABLE TIMESTAMP_TABLE (COLUMN1 TIMESTAMP);
Query OK, 0 rows affected (0.00 sec)

mysql>
mysql> INSERT INTO TIMESTAMP_TABLE VALUES ('1980-12-08 23:59:59.59');
Query OK, 1 row affected (0.00 sec)

mysql>
mysql> SELECT COLUMN1 FROM TIMESTAMP_TABLE;
+---------------------+
| COLUMN1             |
+---------------------+
| 1980-12-08 23:59:59 |
+---------------------+
1 row in set (0.00 sec)

mysql>
mysql> drop table TIMESTAMP_TABLE;
Query OK, 0 rows affected (0.00 sec)

mysql>

   
    
    
    
    
    
  








Related examples in the same category

1.TIMESTAMP as column type
2.timestamp type column default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP
3.Table definition includes a YEAR column and a TIMESTAMP
4.Order by timestamp value
5.dates and times in SQL commands must be given as character strings,
6.Recording a Row's Last Modification Time
7.Recording a Row's Creation Time
8.Performing Calculations with TIMESTAMP Values
9.Updates to tsdemo2 records that don't actually modify a column cause no change to TIMESTAMP values
10.Create a table in which timestamps can be stored.
11.The difference between the creation and modification times
12.Issuing an UPDATE statement that doesn't actually change the values in the val column doesn't update the TIMES