System/OS
2013.04.23 12:23

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

Views 10773 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자리 현재 년도를 가져오게 된다.

?

  1. [linux] iconv를 이용하여 euc-kr 문서를 utf-8로 대량으로 변환하기

  2. [mac] Charlesproxy 간단한 설정 내용~

  3. [linux] X환경 GNOME에서 KDE로 바꾸는 법..

  4. [linux] root도 삭제하지 못하는 파일 속성

  5. [linux] DNS(Domain Name System) 설치, 설정

  6. [sql] alter table 쿼리 예제

  7. [linux] 스케쥴링 순서(nice) 변경하기

  8. [doc] 피쳐셀렉션(feature selection using..) 발표 자료

  9. [linux] 간단한 NAT 설정 script

  10. [linux] root 전환시 패스워드 없이 su 사용하기

  11. [linux] 프로세스 상태확인(ps)

  12. [linux] 콘솔 기본언어 설정 방법

  13. [sql] 내 방명록 답글 찾는 쿼리문.. (JOIN 구문)

  14. [linux] ProFTPD 타임아웃 설정

  15. [router] 시스코 라우터 명령어 모드..

  16. [linux] 아파치 설치/설정(proxy)

Board Pagination Prev 1 4 5 6 7 8 ... 13 Next
/ 13