86
86
# A good datetime, should output 123456
87
87
SELECT MICROSECOND("20081130033015.123456");
89
# A good datetime, should output 123450
90
SELECT MICROSECOND("20081130033015.12345");
92
# A good datetime, should output 123400
93
SELECT MICROSECOND("20081130033015.1234");
95
# A good datetime, should output 123000
96
SELECT MICROSECOND("20081130033015.123");
98
# A good datetime, should output 120000
99
SELECT MICROSECOND("20081130033015.12");
101
# A good datetime, should output 100000
102
SELECT MICROSECOND("20081130033015.1");
89
104
# A good datetime, interpreted int->string, should output 0 since no sub-second component
90
105
SELECT MICROSECOND(20081130033015);
107
# A good datetime, interpreted int->string, should output 123456
108
SELECT MICROSECOND(20081130033015.123456);
110
# A good datetime, interpreted int->string, should output 123450
111
SELECT MICROSECOND(20081130033015.12345);
113
# A good datetime, interpreted int->string, should output 123400
114
SELECT MICROSECOND(20081130033015.1234);
116
# A good datetime, interpreted int->string, should output 123000
117
SELECT MICROSECOND(20081130033015.123);
119
# A good datetime, interpreted int->string, should output 120000
120
SELECT MICROSECOND(20081130033015.12);
122
# A good datetime, interpreted int->string, should output 100000
123
SELECT MICROSECOND(20081130033015.1);
92
125
# A good time (according to MySQL, not Jay Pipes...), should output 0 since no sub-second component
93
126
SELECT MICROSECOND(231115);