当前位置:网站首页>Oracle错误: ORA-01722 无效数字
Oracle错误: ORA-01722 无效数字
2022-07-27 22:27:00 【time Friend】
程序或者Oracle数据库出现“ORA-01722 无效数字” 错误
原因:
1、Oracle数据库的字段为Number类型,如果操作数据库的SQL语句中该字段所携带的数据不是数字类型,Oracle数据库会自动将该字段携带的数据转换成Number类型,但是最后转换不成功就会报错。
例如SQL语句中该字段携带的数据为“123”,那么Oracle可以成功转换,如果该字段携带的数据为“2019年6月10日”,Oracle转换失败,报无效数字错误!
2、SQL语句中多表关联时,关联条件字段的值Oracle会自动转成数字类型,如果转换失败报错。
例如A表的主键ID(Number类型)和B表的某个字段A_ID(Varchar2类型),关联语句:from A left join B on A.ID = B.A_ID,Oracle会首先将A_ID转换成Number类型,如果在插入数据或者修改数据的时候将A_ID的值变成非数字(英文、汉字或者夹杂特殊字符),这时候Oracle转换就会报错。
边栏推荐
- 110. SAP UI5 FileUploader 控件深入介绍 - 为什么需要一个隐藏的 iframe
- SRv6初登场
- Network equipment hard core technology insider firewall and security gateway (12) the mystery of zero contact office
- Swear, swear, swear
- Set 数据构造函数
- Sign up now | cloud native technology exchange meetup Guangzhou station has been opened, and I will meet you on August 6!
- KMP review + AC automata Prequel
- Ddt+yaml implementation of data driven mechanism based on unittest
- 网络设备硬核技术内幕 防火墙与安全网关篇 (六) 安全双修大法 下
- Operators in MySQL
猜你喜欢

Function related knowledge

What is the org relationship mitigation strategy of Microsoft edge browser tracking prevention

Data visualization - White Snake 2: black snake robbery (3)

Jmeter在性能测试中的应用实践样例

The program design questions of the 11th national competition of Bluebridge cup single chip microcomputer

小波变换学习笔记

How to smoothly go online after MySQL table splitting?

UML类图的六大关系,最佳学习理解方式

多线程及多线程程序的编写

Basic operations of MySQL database (3) --- Based on fields
随机推荐
【OpenCV 例程 300篇】241. 尺度不变特征变换(SIFT)
Logic of automatic reasoning 07 - predicate calculus
Jerry's Bluetooth can only link back to the last device [article]
融云 IM & RTC 能力上新盘点
一周年创作纪念日,冲吧少年郎
Redis transaction and optimistic lock
map集合
芯片行业常用英文术语最详细总结(图文快速掌握)
Network device hard core technology insider firewall and security gateway (summary)
Resolved Unicode decodeerror: 'UTF-8' codec can't decode byte 0xa1 in position 0: invalid start byte
Red team killer behinder_ V4.0 (ice scorpion 4.0)
福特SUV版“野马”正式下线,安全、舒适一个不落
LeetCode - 寻找两个正序数组的中位数
Jmeter 如何解决乱码问题?
论文赏析[ICLR18]联合句法和词汇学习的神经语言模型
Scrollview, tableview nested solutions
推荐系统-模型:wide&deep 模型
Postman download and use tutorial
Syntaxerror resolved: positive argument follows keyword argument
Basic operations of MySQL database (I) --- Based on Database