I am trying to create my first stored function on MySQL. In this function I want to return the timestamp of the current date and time with 3 microsecond digits like this:
For mysql 5.6
round(unix_timestamp() * 1000 + MICROSECOND(sysdate(6)) / 1000)