Notice
Recent Posts
Recent Comments
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- @SqlResultSetMapping
- ibatis
- zabbix
- MySQL
- bootstrap jquery datepicker
- querydsl
- jquery
- rember me
- spring transaction
- jquery serialize
- gwt-ext
- maven
- Drools Fusion
- spring jpa
- Spring
- GEventEvaluator
- COC
- Hudson
- drools
- spring security
- CEP
- jenkins
- gwt
- java tip
- JPA
- SVN
- JBoss Seam
- guvnor
- jstl
- custom filter
Archives
- Today
- Total
봉 블로그
mysql function 본문
# DATE => String
DATE_FORMAT(SVC_END_YMD,'%Y-%m-%d %H:%i:%s')
# String => Date
mysql>
SELECT STR_TO_DATE('01,5,2013','%d,%m,%Y');
-> '2013-05-01'
# DATE 증감
ADDDATE(NOW(),-1)
# 타입 변환
CONVERT(
, expr
,type
)CONVERT(
expr
USING transcoding_name
)
The CONVERT()
and CAST()
functions take a value of one type and produce a value of another type.
The type
can be one of the following values:
# NULL 체킹
mysql>
SELECT IFNULL(NULL,10);
-> 10