I need to write a SELECT query in one line only that could potentially return n number of rows.
eg
select 1 as 'primary', 'peter@email.com' as 'email'
Will return 1 row with column primary=1 and column email peter@email.com
My parser does not read beyond the first SELECT – so i need to write all this data using 1 select. I have searched a bit but cant really find a proper answer.
eg.
select (1 as 'primary', 'peter@email.com' as 'email'),(2 as 'primary', 'dave@email.com' as 'email')
does not work..
How about this?