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:
Take a look at what MySQL says(http://dev.mysql.com/doc/refman/5.1/en/fractional-seconds.html):
However, when MySQL stores a value into a column of any temporal data type, it discards any fractional part and does not store it.
So you need to store it not as a date value, but as a simple floating point value.