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. [doc] TCP/IP 강의 자료 (html)

  2. [linux] 간단한 find 명령어 설명(업데이트 해야 함)

  3. NAT와 DHCP에 대한 간단한 설명

  4. [router] 설정과 기본 명령어들 모음

  5. [windows] 종료, 재시작, 로그아웃 아이콘 만들기

  6. [windows] 인터넷 익스플로러(IE) 도구모음 표시줄에 아이콘 추가

  7. [doc] 네트워크 장비와 라우터 설정 방법 발표 자료

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

  9. [sql] 조회구문(select)에서 중복 데이터를 한 번만 출력 (distinct)

  10. [sql] 중복데이터 삭제 쿼리

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

  12. [unix] AIX쉘 초기 파일 (.cshrc)

  13. [ms-sql] 프로시져 예제..

  14. [ms-sql] 서브스트링(substring), 프로시저(SP) 작성 예제

  15. 나중에 해봐야지.. libconv 설치.. ㅡ,.ㅡ;

  16. [linux] 리눅스,유닉스 /proc/stat 파일 보는 법

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