4,490,349 th visitor since 2017.2.1 ( Today : 321 )
Programming
No. 825
Name. swindler
Subject. DATETIME에 default 현재 시간 입력하는 법
Main Cate. MySQL
Sub Cate.
Date. 2021-08-25 15:52
Hit. 638 (121.134.199.74)
File.
5.6.5이상에서만 된다고 한다.

alter table PRODUCT_PRD add REG_DATE datetime default current_timestamp;

이런식으로 default를 current_timestamp로 넣으면 됨.

[바로가기 링크] : http://coolx.net/cboard/develop/825



Name
Password
Comment
Copyright © 1999-2017, swindler. All rights reserved. 367,611 visitor ( 1999.1.8-2004.5.26 ), 2,405,771 ( -2017.01.31)

  2HLAB   2HLAB_Blog   RedToolBox   Omil   Omil_Blog