Contents

System/OS
2013.04.23 12:23

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

Views 11682 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
132 System/OS [linux] 웹로그분석기(webalizer) 설치 & 팁 hooni 2003.04.23 16010
131 System/OS [linux] 이기종간의 파일 공유(Samba) hooni 2003.04.23 15953
130 System/OS [perl] 펄 환경 설정해야 할거 ㅋㅋ hooni 2003.04.23 15933
129 System/OS [mac] SVN 1.8 업데이트 방법 hooni 2013.09.24 15888
128 System/OS [linux] 아파치설치/설정 - 사용인증 hooni 2003.04.23 15886
127 System/OS [sql] 중복데이터 삭제 쿼리 hooni 2013.04.23 15766
126 System/OS [linux] 랜카드 2개 설정 & iptables 로 사설 ip.. hooni 2003.04.23 15593
125 System/OS [linux] 리눅스 활용 팁^^ hooni 2003.04.23 15541
124 System/OS [linux] 아파치설치/설정(CGI부분) hooni 2003.04.23 15448
123 System/OS [linux] sendmail 설정/사용 hooni 2003.04.23 15425
122 System/OS [linux] 기본 명령어 (내공쌓기) hooni 2003.04.23 15282
121 System/OS [linux] 아파치설치/설정 hooni 2003.04.23 15241
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 ... 17 Next
/ 17