MySQL Microsecond function is one of the MySQL Date Function, which returns the microseconds from the given time or DateTime expression. The syntax of the Microsecond() Function in MySQL is as shown below:
MICROSECOND(DateTime or time expression);
MySQL Microsecond function Example
These examples help you understand the use of this Microsecond function. Here, we are returning the Microseconds from the time expression, and the Date & time expression.
SELECT MICROSECOND('2019-02-14 10:12:22.223156');
From the above screenshot, MICROSECOND(’12:12:62.123160′); means we are trying to get a microsecond from an invalid date. That’s why it returns NULL.