The relevant table, named emp, holds the following data:
CREATE TEMPORARY TABLE emp AS
SELECT * FROM ( VALUES (1,'A'), (2,'B'), (3,'C') );
ID Name
-- ----
1 A
2 B
3 C
And the output or result-set of the data manipulation operation should be as shown bellow:
ID Name
-- ----
1 A
1 A
2 B
2 B
3 C
3 C
Requirements
The output must be obtained complying with the following conditions:
- No use of the UNION ALL operator in association with the employed SELECT statement(s)
- No use of temporary table(s)
- No use of an UPDATE operation to the existing table
Note: This scenario was brought up to me by an interviewer.