웹이야기

MySQL MICROSECOND() 본문

D/MySQL

MySQL MICROSECOND()

yeon.Biju 2020. 4. 2. 13:40

MySQL 날짜함수, 시간함수

 

MICROSECOND()

   - 시간으로부터 microsecond 를 return 해준다.

 

MICROSECOND(expr)

의 형태

 

Returns the microseconds from the time or datetime expression expr as a number in the range from 0 to 999999.

 

mysql> SELECT MICROSECOND(NOW());
+--------------------+
| MICROSECOND(NOW()) |
+--------------------+
|                  0 |
+--------------------+
1 row in set (0.00 sec)

 

mysql> SELECT MICROSECOND('2019-02-02 :12;35:56');
+-------------------------------------+
| MICROSECOND('2019-02-02 :12;35:56') |
+-------------------------------------+
|                                   0 |
+-------------------------------------+
1 row in set (0.00 sec)

 

mysql> SELECT MICROSECOND('2019-02-02 :12;35:56.111111');
+--------------------------------------------+
| MICROSECOND('2019-02-02 :12;35:56.111111') |
+--------------------------------------------+
|                                     111111 |
+--------------------------------------------+
1 row in set (0.00 sec)

'D > MySQL' 카테고리의 다른 글

MySQL MONTH()  (0) 2020.04.02
MySQL MINUTE()  (0) 2020.04.02
MySQL MAKETIME()  (0) 2020.04.02
MySQL MAKEDATE()  (0) 2020.04.02
MySQL LOCALTIME()  (0) 2020.04.02
Comments