Duplicate using UNION for char datatype of different lengths
(Doc ID 2760918.1)
Last updated on JULY 20, 2024
Applies to:
Oracle Database - Enterprise Edition - Version 10.1.0.2 and laterInformation in this document applies to any platform.
Symptoms
- Wrong results when using UNION with CHAR datatypere getting columns of different length:
SQL> create table table_A (affm char(12));
create table table_B (affm char(9));
insert into table_A values ('123');
insert into table_B values ('123');
commit;SQL> SELECT affm FROM table_A
2 UNION
3 SELECT affm FROM table_B
4 /AFFM
------------
123
123UNION should not give duplicates.
Changes
N/A
Cause
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Symptoms |
Changes |
Cause |
Solution |
References |