Sean
Sean

Reputation: 79

How to create a second set of records in Oracle

I have set of records:

Title     Format
ABC       CD
DEF       CD

I want to add a an additional format. The final set will look like:

Title     Format
ABC       CD
DEF       CD
ABC       LP
DEF       LP

What will the query look like?

Upvotes: 0

Views: 18

Answers (1)

Radim Bača
Radim Bača

Reputation: 10701

I would use UNION ALL

SELECT title, format FROM table
UNION ALL
SELECT title, 'LP' FROM table

Upvotes: 1

Related Questions