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. 맥에서 파일공유 (윈도우,맥)

    Date2013.04.25 CategorySystem/OS Byhooni Views37301
    Read More
  2. 맥에서 포트 확인하고 닫기 (mac)

    Date2022.03.22 CategorySystem/OS Byhooni Views892
    Read More
  3. 무료로 HTTPS 적용하기 (Let's Encrypt)

    Date2017.10.28 CategorySystem/OS Byhooni Views1401
    Read More
  4. 무료로 HTTPS 적용하기 (Lets' Encrypt)

    Date2017.02.16 CategorySystem/OS Byhooni Views2176
    Read More
  5. 무선 인증 서버.. 김도.. ㅋㅋ

    Date2013.04.23 CategorySystem/OS Byhooni Views17595
    Read More
  6. 서버 확장을 위한 두 가지 방법

    Date2018.08.29 CategorySystem/OS Byhooni Views2098
    Read More
  7. 아파치(Apache) 인증사용(htaccess)으로 특정 디렉토리에 암호걸기

    Date2013.04.23 CategorySystem/OS Byhooni Views13659
    Read More
  8. 컴파일러 수업 자료(교재 : 컴파일러 입문)

    Date2003.04.23 CategorySystem/OS Byhooni Views21966
    Read More
  9. 콘솔에서 패스워드 걸린 zip 압축하는 명령

    Date2018.03.02 CategorySystem/OS Byhooni Views939
    Read More
  10. 해커스랩 깨기.. 후후.. ㅋㅋ

    Date2013.04.23 CategorySystem/OS Byhooni Views18413
    Read More
Board Pagination Prev 1 ... 9 10 11 12 13 Next
/ 13