How to resolve Oracle error ORA-01790?

2019-02-22 11:23发布

I have two select statements joined by "union". While executing that statement I've got:

Error report: SQL Error: ORA-01790: expression must have same datatype as corresponding expression 01790. 00000 - "expression must have same datatype as corresponding expression"

Maybe you can give me an advise on how to diagnose this problem?

7条回答
男人必须洒脱
2楼-- · 2019-02-22 11:57

You need to make sure that corresponding columns in your union have the same data type. The easiest way would be to comment out columns one by one to narrow down to the column and then use explicit type conversion function in one of them to make types match.

查看更多
登录 后发表回答