On Wed, Dec 07, 2005 at 09:43:30AM +0800, Christopher Kings-Lynne wrote:
> >>Why aren't 'minutes' considered too? Because they aren't 'seconds'.
> >>Well, seconds aren't microseconds either.
> >
> >Yeah, they are: it's just one field. The other way of looking at it
> >(that everything is seconds) is served by "extract(epoch)".
>
> Well, it's different in MySQL unfortunately - what does the standard
> say?
I don't see microseconds as a possible field in SQL:2003 (draft copy).
> Out of interest, can someone try this for me in MySQL 5:
>
> SELECT EXTRACT (MICROSECOND FROM '2003-01-02 10:30:00.00123');
> SELECT EXTRACT (MICROSECOND FROM '2003-01-02 10:30:10.00123');
MySQL 5.0.16 gives an error:
mysql> SELECT EXTRACT (MICROSECOND FROM '2003-01-02 10:30:00.00123');
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 'FROM '2003-01-02 10:30:00.00123')' at line 1
--
Michael Fuhr