mysql 학습정리 : select + 날짜 및 시간 함수
·
CS/MySql 정리
날짜/시간 함수 원하는 날짜를 가져오거나 형식대로 사용할 수 있다. 날짜 및 시간을 가져오는 함수 now() sysdate() current_timestamp() 날짜만 : curdate() 시간만 : curtime() 날짜 연산 함수 date_add("interval {수} {year, month, day, hour, minute, second}") date_sub(위와 동일) 쿼리문 -- 현재 날짜와 시간 select now(); select sysdate(); select current_timestamp(); -- 현재 날짜 select curdate(); select current_date(); -- 현재 시간 select curtime(); select current_time(); -- 날짜에서..