美文网首页
ORA-01722: 无效数字

ORA-01722: 无效数字

作者: 园溪 | 来源:发表于2019-07-10 15:12 被阅读0次

create table test_a(

a_id varchar2(100),

a_name varchar2(100)

);

create table test_b(

b_id number,

b_name varchar(100)

);

test_a表 test_b表

当test_a表的a_id出现中文时a_id与b_id关联会报错ORA-01722: 无效数字,解决方法:b_id要转为to_char,to_char(b.b_id)。

select * from test_a a,test_b b where a.a_id=to_char(b.b_id)

相关文章

网友评论

      本文标题:ORA-01722: 无效数字

      本文链接:https://www.haomeiwen.com/subject/vyjhkctx.html