반응형

출처:

http://blog.habonyphp.com/246#.Vgutd5d0lqP

http://jsonobject.tistory.com/122


1. 현재 날짜

select curdate();

2. 현재 시간

select curtime();

3. 현재 날짜와 시간

select now();

3. 현재 날짜와 시간

select now();

그러나 이는 어디까지나 알아보는 용도일 뿐이고,

테이블에 기본값으로 현재 시간을 넣기 위해서는 다음과 같이 한다.

create table 테이블명 컬럼명 datetime default current_timestamp;


반응형
Posted by 애콜라이트
l

free counters