In simple terms the table (t1) looks like this:
id hours dollars ----------------------- abc 4 40
I’d like to get results from the table that looks like this:
abcHours 4 0 abcDollars 0 40
Thanks
Advertisement
Answer
You may try simple query, using operator Union:
Select 'abcHours' as abcHour, hours as Hour, 0 as dollar Union all Select 'abcDollars', 0, dollars