当前位置:网站首页>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
边栏推荐
猜你喜欢

STM32接电机驱动,杜邦线供电,然后反烧问题

Visual Road (XII) detailed explanation of collection class

使用 PHP PDO ODBC 示例的 Microsoft Access 数据库

Introduction to neo4j authoritative guide, recommended by Qiu Bojun, Zhou Hongxiang, Hu Xiaofeng, Zhou Tao and other celebrities

第六站神京门户-------手机号码的转换

MIT:用无监督为世界上每个像素都打上标签!人类:再也不用为1小时视频花800个小时了

26. Delete duplicates in ordered array

R-Drop:更强大的Dropout正则方法

Cumcm 2021 - B: préparation d'oléfines C4 par couplage éthanol (2)

Use of SVN:
随机推荐
学习 Go 语言 0x06:《Go 语言之旅》中 斐波纳契闭包 练习题代码
Visualized common drawing (II) line chart
语雀文档编辑器将开源:始于但不止于Markdown
我的创作纪念日
MySQL8.0升级的踩坑历险记
Mba-day5 Mathematics - application problems - engineering problems
2022爱分析· 工业互联网厂商全景报告
An interesting interview question
R-Drop:更强大的Dropout正则方法
Mysql database transaction example tutorial
26. Delete duplicates in ordered array
GO接口使用
MySQL interview questions explain how to set hash index
Detailed explanation of how to smoothly go online after MySQL table splitting
Constraintlayout layout
mysql创建存储过程及函数详解
FileProvider 路径配置策略的理解
Visual common drawing (I) stacking diagram
Cumcm 2021 - B: préparation d'oléfines C4 par couplage éthanol (2)
期货开户哪个公司好?安全靠谱的期货公司谁能推荐几家?