当前位置:网站首页>mysql中的字段问题
mysql中的字段问题
2022-07-03 13:01:00 【永远的HelloWorld】
mysql的数据库中的字段类型为datetime,通常是正常的时间类型,比如:2021-04-11 18:10:06或者null,但有时候在导入数据的时候这个字段的值会变为0000-00-00 00:00:00,这种情况下查询就出现错误。这是因为0000-00-00 00:00:00在数据库是允许出现的特殊值,但是会被jvm认为不合法的。
解决办法:
1.避免数据库出现这个时间
2.在数据库的链接url后面加上 &&zeroDateTimeBehavior=convertToNull
边栏推荐
- The network card fails to start after the cold migration of the server hard disk
- 今日睡眠质量记录77分
- Kivy tutorial how to load kV file design interface by string (tutorial includes source code)
- ThreadPoolExecutor realizes multi-threaded concurrency and obtains the return value (elegant and concise way)
- Several common optimization methods matlab principle and depth analysis
- php:  The document cannot be displayed in Chinese
- Tencent cloud tdsql database delivery and operation and maintenance Junior Engineer - some questions of Tencent cloud cloudlite certification (TCA) examination
- MySQL constraints
- 【被动收入如何挣个一百万】
- 顺序表(C语言实现)
猜你喜欢

Flink SQL knows why (19): the transformation between table and datastream (with source code)

106. How to improve the readability of SAP ui5 application routing URL

February 14, 2022, incluxdb survey - mind map

Logseq evaluation: advantages, disadvantages, evaluation, learning tutorial

Servlet

Can newly graduated European college students get an offer from a major Internet company in the United States?

2022-02-11 heap sorting and recursion

Resource Cost Optimization Practice of R & D team

TensorBoard可视化处理案例简析

Road construction issues
随机推荐
道路建设问题
The latest BSC can pay dividends. Any B usdt Shib eth dividend destruction marketing can
This math book, which has been written by senior ml researchers for 7 years, is available in free electronic version
In the promotion season, how to reduce the preparation time of defense materials by 50% and adjust the mentality (personal experience summary)
JS 将伪数组转换成数组
JSON serialization case summary
php:  The document cannot be displayed in Chinese
Flink SQL knows why (7): haven't you even seen the ETL and group AGG scenarios that are most suitable for Flink SQL?
网上开户哪家证券公司佣金最低,我要开户,网上客户经理开户安全吗
Logback 日志框架
MySQL installation, uninstallation, initial password setting and general commands of Linux
研发团队资源成本优化实践
Convolution emotion analysis task4
【R】 [density clustering, hierarchical clustering, expectation maximization clustering]
Servlet
显卡缺货终于到头了:4000多块可得3070Ti,比原价便宜2000块拿下3090Ti
untiy世界边缘的物体阴影闪动,靠近远点的物体阴影正常
[Database Principle and Application Tutorial (4th Edition | wechat Edition) Chen Zhibo] [Chapter 6 exercises]
Flink code is written like this. It's strange that the window can be triggered (bad programming habits)
Comprehensive evaluation of double chain notes remnote: fast input, PDF reading, interval repetition / memory