본문 바로가기

DATABASE/MySQL

현재 날짜 curdate() 잘르기 substring

mysql> SELECT substring(CONCAT(curdate()+0,"0000"),3,10);

+--------------------------------------------+

| substring(CONCAT(curdate()+0,"0000"),3,10) |

+--------------------------------------------+

| 1812100000                                 |

+--------------------------------------------+

1 row in set (0.00 sec)