aaron_s
Sat 9 February 2008, 04:15 am GMT +0100
Lets say you have a 3 column database with colums of 'id', 'username' and 'registrationDate'
So lets say you want to generate a csv with somethignl ike mysql, you can.... but lets put the column names on the top. Cool
Select 'id', 'username', 'registrationDate'
union
Select * from tableName;
coolios.
Now here's the thing - how would you make it be a dynamic thing? I don't want to modify this particular query whenever I add a new column.
(If you ask why - go for it - I'll explain - but I don't think its needed for the solution.)
Any ideas are more than welcome.
So lets say you want to generate a csv with somethignl ike mysql, you can.... but lets put the column names on the top. Cool
Select 'id', 'username', 'registrationDate'
union
Select * from tableName;
coolios.
Now here's the thing - how would you make it be a dynamic thing? I don't want to modify this particular query whenever I add a new column.
(If you ask why - go for it - I'll explain - but I don't think its needed for the solution.)
Any ideas are more than welcome.