Default value for "microtime" column in MySQL My interest is to store the time with FSP of 6. As I've read, this cannot be achieved with TIMESTAMP or DATETIME data types. So, I have a double field to store the output of the microtime function.

Is there anyway I can set (or even write some code to create) a default value for such a field?

I want to use something like NOW(6) and get 1442059062.065123 for example.
You could format it with UNIX_TIMESTAMP like below:

mysql&gt; SELECT UNIX_TIMESTAMP(NOW(6));
+------------------------+
| UNIX_TIMESTAMP(NOW(6)) |
+------------------------+
|      1442068528.543100 |
+------------------------+
1 row in set (0,00 sec)

mysql&gt; 


You can find any others date and time functions here. You could add a trigger and if you want a default value for your decimal(16, 6) microtime, use BEFORE INSERT and replace your NEW.bigintvalue=UNIX_TIMESTAMP(NOW(6));.

Example:

mysql&gt; CREATE TABLE `test`.`test1` (
    -&gt;   `id` INT NOT NULL AUTO_INCREMENT,
    -&gt;   `time` DECIMAL(16, 6) NULL,
    -&gt;   PRIMARY KEY (`id`));
Query OK, 0 rows affected (0.01 sec)

mysql&gt; 
mysql&gt; DELIMITER //
mysql&gt; CREATE DEFINER=`root`@`localhost` TRIGGER `test`.`test1_BEFORE_INSERT` BEFORE INSERT ON `test1` FOR EACH ROW
    -&gt; BEGIN
    -&gt; SET NEW.time=UNIX_TIMESTAMP(NOW(6));
    -&gt; END
    -&gt; //
Query OK, 0 rows affected (0.00 sec)

mysql&gt; DELIMITER ;
mysql&gt; 
mysql&gt; # Adding 1 into id field
mysql&gt; INSERT INTO `test`.`test1` (`id`) VALUES ('1');
Query OK, 1 row affected (0.00 sec)

mysql&gt; select * from test.test1;
+----+-------------------+
| id | time              |
+----+-------------------+
|  1 | 1442069359.675330 |
+----+-------------------+
1 row in set (0.00 sec)

mysql&gt;