Skip to content
Advertisement

How to perform mysql query with goal of returning 2 rows when a single record is found in

This will return one row with a result of:

How would it be possible to return multiple rows for a given column while retaining the other column field values.

Essentially, adding rows on the fly when the conditions are met.

My thought process attempted:

Desired Result:

Advertisement

Answer

Are you looking for union all?

Or a CROSS JOIN:

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement