System/OS
2013.04.23 12:23
[mysql] 시간 관련 SQL구문..
조회 수 10777 댓글 0
현재 시간을 타임스템프로 출력하는 구문
select now();
select unix_timestamp();
현재 시간을 년-월-일 시간으로 출력하는 구문
select sysdate();
현재 시간을 년월일시.. 모두 붙여서 출력하는 구문
select now()+0;
예를 들어..
select substring(now(), 0, 4);
이 구문을 쓰면 타임스템프의 앞부분 4자리를 가져오지만..
select substring(now()+0, 0, 4);
이 구문을 쓰면 4자리 현재 년도를 가져오게 된다.
-
[linux] 프로그램 설치방법 (내공쌓기)
-
[linux] 쉘 스크립트에 대한 설명과 예제..
-
[ms-sql] 프로시져 예제..
-
[linux] Xwindow/Xmanager 사용
-
[linux] 아파치설치/설정 - SSI(Server Side Include)
-
[linux] 계정관리하기(내공쌓기)
-
[linux] 한글 URL 인식할 수 있게 아파치(Apache) 설정 (mod_url.c 설치)
-
[linux] Proftpd 설치 가이드
-
[linux] DHCP(Dynamic Host Configuration Protocol) 서버
-
[linux] ipfwadm를 이용한 패킷필터링(구버전)
-
[linux] 아파치 설치/설정(proxy)
-
[router] 시스코 라우터 명령어 모드..