aiaiDBA

加微信获取免费职业规划+学习资料,了解年薪50万的DBA是如何练成的

13718043309

010-86462881

PLS-00399: different types of columns in UNION, INTERSECT, or MINUS expression

PLS-00399: different types of columns in UNION, INTERSECT, or MINUS expression
Cause: The select lists to the left and right of a UNION, INTERSECT, or MINUS expression select at least one column that is mismatched in datatype. For example, the following statement is faulty because the constant 3 has datatype NUMBER, whereas SYSDATE has datatype DATE: CURSOR my_cur IS SELECT 3 FROM emp INTERSECT SELECT SYSDATE FROM emp;
Action: Change the select lists so that they match in datatype. You might want to use datatype conversion functions in the select list of one or more queries.

请先 登录 后评论

1 个回答

小智
PLS-00399:UNION,INTERSECT或MINUS表达式中不同类型的列,
.原因: UNION,INTERSECT或MINUS表达式左侧和右侧的选择列表至少选择一个数据类型不匹配的列。例如,以下语句是错误的,因为常量3具有数据类型NUMBER,而SYSDATE具有数据类型DATE:CURSOR my_cur IS SELECT 3 FROM emp INTERSECT SELECT SYSDATE FROM emp;,
.操作:更改选择列表,使其与数据类型相匹配。您可能希望在一个或多个查询的选择列表中使用数据类型转换功能。,
.
请先 登录 后评论