SELECT level, param, 'GMKSA' (TITLE 'OWNER') FROM gmksa WHERE cycle = '03' UNION SELECT level, param, 'GMKSA CONTROL' FROM gmksa_control WHERE cycle = '03' ORDER BY 1, 2;
The query returns the following results set:
***QUERY COMPLETED. 5 ROWS FOUND. 3 COLUMNS RETURNED. LEVEL PARAM OWNER ----- ----- ----- 00 A GMKSA 00 T GMKSA 85 X GMKSA SF A GMKSA SF T GMKSA
The first SELECT specifies GMKSA, which is CHAR(5)—that data type is then forced on the second SELECT. Therefore, GMKSA_CONTROL entries are dropped because the first five characters are the same.
Because this query does not specify the ALL option, duplicate rows are dropped.