Я думаю, что он должен получить значение формата datetime (). В чем ошибка?
CREATE
DEFINER=`root`@`localhost`
TRIGGER `check`
BEFORE INSERT
ON `whatstore`
FOR EACH ROW
BEGIN
declare last_insert_time datetime(6);
declare new_insert_time datetime(6);
set @last_insert_time=(select insert_time
from whatstore
order by id desc limit 1);
select timediff(new.insert_time,@last_inserted_time) into @new_insert_time;
case when @new_insert_time > 1
then insert into `delete`.table3(time_diff)
values (@new_inserted_time);
else insert into `delete`.table3(time_diff)
values(@new_inserted_time);
end case;
END