Oracle数据库: ORA-01722: 无效数字

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/jioujiou520/article/details/89511596

ORA-01722: 无效数字 常见原因

日期格式化错误

比如对已经是字符串格式的日期重新进行日期格式化

select to_char('2018-01-01','yyyy-MM-dd') from dual

数字与字符串相等关联

比如将字段格式为字符的使用to_number与数字比较,但是字符中混有识别不了的非数字字符.

select * from dual where to_number('1x') = 1;

但是,科学计数法除外

select * from dual where to_number('1.0E1') = 10;

猜你喜欢

转载自blog.csdn.net/jioujiou520/article/details/89511596