Problem: How can I subtract the TIMEDIFF
between two sensors (sensor 1 and sensor 2 in the example below) and return the the value in mili seconds?
How do I get with the resolution of milliseconds?
I am using the command line below to try to create the table with milliseconds resolution but returns error.
CREATE TABLE via1
(
id int auto_increment primary key,
sensor VARCHAR (10) NOT NULL,
date timestamp(6) default current_timestamp(6)
);
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(6) default current_timestamp(6))' at line 1
Server version: 5.5.44-0 + deb7u1 (Debian)