System/OS
2013.04.23 12:23

[mysql] 시간 관련 SQL구문..

Views 10867 Votes 0 Comment 0
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print
현재 시간을 타임스템프로 출력하는 구문
select now();
select unix_timestamp();

현재 시간을 년-월-일 시간으로 출력하는 구문
select sysdate();

현재 시간을 년월일시.. 모두 붙여서 출력하는 구문
select now()+0;


예를 들어..

select substring(now(), 0, 4);
이 구문을 쓰면 타임스템프의 앞부분 4자리를 가져오지만..

select substring(now()+0, 0, 4);
이 구문을 쓰면 4자리 현재 년도를 가져오게 된다.

?

List of Articles
No. Category Subject Author Date Views
138 System/OS [linux] 스케쥴링 순서(nice) 변경하기 hooni 2003.04.23 12600
137 System/OS [linux] 기존 환경설정 저장하면서 커널 컴파일.. hooni 2003.04.23 13525
136 System/OS [linux] Proftpd 설치 가이드 hooni 2003.04.23 13076
135 System/OS [sql] 내 방명록 답글 찾는 쿼리문.. (JOIN 구문) hooni 2003.04.23 12921
134 System/OS [sql] alter table 쿼리 예제 hooni 2003.04.23 12520
133 System/OS [dos] 노트북 백업 스크립트 xcopy 명령 예제 hooni 2003.04.23 40868
132 System/OS [linux] 터미널에서 문자 깨질 때 설정 ㅋㅋ hooni 2003.04.23 13962
131 System/OS [linux] root도 삭제하지 못하는 파일 속성 hooni 2003.04.23 12457
130 System/OS [linux] man 명령어 뽀개기.. hooni 2003.04.23 8775
129 System/OS [web] 웹서비스 취약점 자료.. (논문첨부) file hooni 2003.04.23 18053
128 System/OS [linux] 꿀통(honeyd) 설치하기.. 메뉴얼 과정 6 file hooni 2006.04.23 20295
127 System/OS [linux] 데비안(debian.org) 리눅스 명령어 예제 hooni 2006.04.23 10497
» System/OS [mysql] 시간 관련 SQL구문.. hooni 2013.04.23 10867
125 System/OS [router] 시스코 라우터 명령어 모드.. hooni 2013.04.23 13000
124 System/OS [router] 라우팅 프로토콜 BGP (간단한 세팅) hooni 2013.04.23 11004
123 System/OS 네트워크별 MTU(최대 전송 단위) hooni 2013.04.23 17705
Board Pagination Prev 1 3 4 5 6 7 ... 13 Next
/ 13