mysql 어제, 오늘 구하기(DATE_ADD, DATE_SUB)
mysql 어제, 오늘 구하기(DATE_ADD, DATE_SUB) SELECT DATE_SUB(CURDATE(), INTERVAL 1 DAY) AS 'yesterday',DATE_SUB(CURDATE(), INTERVAL -1 DAY) AS 'tommorow',DATE_ADD(CURDATE(), INTERVAL -1 DAY) AS 'yesterday' ,DATE_ADD(CURDATE(), INTERVAL 1 DAY) AS 'tommorow' FROM DUAL date_sub은 빼기date_add는 더하기 참고주소: http://www.w3schools.com/sql/func_date_sub.asp