How to insert a microsecond-precision datetime into mysql?

后端 未结 4 2114
野的像风
野的像风 2020-12-28 15:38

I have a string like this:

2011-11-11 11:11:11.111111

and I need to insert it in MySql, into a datetime column. But after I insert it, it b

4条回答
  •  太阳男子
    2020-12-28 16:23

    use data type of datetime(6) or timestamp(6) in your table and insert current time with NOW(6) to get 6 digits of fractional seconds.

提交回复
热议问题