출처 : 날짜 비교
select * from table where (DATEDIFF(strEndDate,strStartDate)> 5 and DATEDIFF(strEndDate,strStartDate)<= 10)
DATEDIFF(strEndDate,strStartDate) > 5
일수 함수 : 끝나는 기간, 시작하는 기간 5보다 큰값
'IT > [DB]MySql' 카테고리의 다른 글
MYSQL] AES 암호화 복호화 (0) | 2014.04.02 |
---|---|
databasename 언어변경 (0) | 2014.01.20 |
order by문 case문쓰기 (0) | 2013.12.03 |
mysql 자동증가 atler문 (0) | 2013.10.08 |
[mysql] 다양한 시간차 구하기 (0) | 2013.08.26 |