当前位置:网站首页>MySQL failed to insert the datetime type field without single quotation marks
MySQL failed to insert the datetime type field without single quotation marks
2022-04-23 11:12:00 【CSDN Q & A】
The phenomenon and background of the problem
Insert datetime Field , Insertion without single quotation marks is unsuccessful
Problem related code , Do not paste screenshots
insert into tb_shop(owner_id,area_id,shop_category_id,shop_name,shop_desc,shop_addr,phone,shop_img,priority, create_time,last_edit_time,enable_status,advice) values (1, 4, 1, 111, 123, 2222, 3333, null, null, 2022-04-14 22:02:07.913, 2022-04-14 22:02:09.769, 0, null)
Report errors :
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '22:02:07.913, 2022-04-14 22:02:09.769, 0, null)' at line 1, Time: 0.000000s
Change to this and you can succeed :insert into tb_shop(owner_id,area_id,shop_category_id,shop_name,shop_desc,shop_addr,phone,shop_img,priority, create_time,last_edit_time,enable_status,advice) values (1, 4, 1, 111, 123, 2222, 3333, null, null, '2022-04-14 22:02:07.913', '2022-04-14 22:02:09.769', 0, null)
Operation results and error reporting contents
My solution ideas and tried methods
What I want to achieve
Ask for help to answer questions , thank you
Take the answer :
Quotation marks must be added , Otherwise, it will be recognized as arithmetic expression first 2022-04, And then meet 04, It's a mistake .
版权声明
本文为[CSDN Q & A]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204162004030895.html
边栏推荐
- Software testers, how to mention bugs?
- remote: Support for password authentication was removed on August 13, 2021.
- Excel · VBA array bubble sorting function
- Source insight 4.0 FAQs
- Introduction to neo4j authoritative guide, recommended by Qiu Bojun, Zhou Hongxiang, Hu Xiaofeng, Zhou Tao and other celebrities
- Three web components (servlet, filter, listener)
- Cumcm 2021 - B: préparation d'oléfines C4 par couplage éthanol (2)
- 闹钟场景识别
- Anaconda3 installation
- Pytorch implementation of transformer
猜你喜欢
Cumcm 2021 - B: préparation d'oléfines C4 par couplage éthanol (2)
MySQL Router重装后重新连接集群进行引导出现的——此主机中之前已配置过的问题
The songbird document editor will be open source: starting with but not limited to markdown
学习 Go 语言 0x04:《Go 语言之旅》中切片的练习题代码
Promise详解
Detailed explanation of typora Grammar (I)
第六站神京门户-------手机号码的转换
Visual common drawing (III) area map
About the three commonly used auxiliary classes of JUC
Constraintlayout layout
随机推荐
MySQL interview questions explain how to set hash index
Typora operation skill description (I) md
Excel·VBA数组冒泡排序函数
remote: Support for password authentication was removed on August 13, 2021.
MySQL partition table can be classified by month
Detailed explanation of integer data type tinyint in MySQL
学习 Go 语言 0x03:理解变量之间的依赖以及初始化顺序
Oracle connectivity test gadget
Latex usage
C语言之结构体(进阶篇)
26. 删除有序数组中的重复项
Using El popconfirm and El backtop does not take effect
An interesting interview question
MySQL对数据表已有表进行分区表的实现
Learning go language 0x02: understanding slice
Mysql中一千万条数据怎么快速查询
MBA-day5数学-应用题-工程问题
学习 Go 语言 0x02:对切片 Slice 的理解
Mysql排序的特性详情
Understanding of fileprovider path configuration strategy