开发者

Changing data type from date to date/time in mysql?

开发者 https://www.devze.com 2023-01-24 06:36 出处:网络
I am using mysql Db. I 开发者_StackOverflow社区having a field like current_date in date data type. I have thousands of data right now.

I am using mysql Db. I 开发者_StackOverflow社区having a field like current_date in date data type. I have thousands of data right now.

Now I want to capture the time of the current_date field. So now I am going to change the data type from date to date/time.

Is this cause any problem to do this? Suppose I changed, what about the old records?


The old records will just recieve a time value of 00:00:00

At least, this is what occured for me when converting date to datetime via phpmyadmin

Therefore the result should be 2010/11/11 00:00:00

0

精彩评论

暂无评论...
验证码 换一张
取 消