Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the problem of mysql insertion timestamp

2025-02-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article will explain in detail how to solve the problem of mysql insertion timestamp, the content of the article is of high quality, so the editor will share it for you as a reference. I hope you will have some understanding of the relevant knowledge after reading this article.

Timestamp (6) is set in the data table, and then the timestamp cannot be generated from the database for various reasons, but is generated according to the function written by yourself, and then the following error occurs occasionally:

Incorrect datetime value: '2017-11-28 16 MYTIMESTAMP' at row 0415 05.1e3000' for column' MYTIMESTAMP' at row 1

The millisecond count is followed by a scientific count, and this is the only example that has never happened before and after. I wonder, and then take a look at the method.

ROUND (ROUND (RAND (), 3) * 1000), because the first three digits after milliseconds are concatenated based on strings, indicating that 1e3 is generated directly from random numbers. I cheated, didn't I say that RAND () got [0J1], how did it get 1?

On how to solve the problem of mysql timestamp insertion to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report