I have a database in which i have required data. I am setting up linnworks and in that i have to do sql queries to get data from the database. The required data is in the database but column names are different than required by linnworks. How do I change column names in the SELECT sql statement so that when data is returned it returns the col names as required by linnworks and not what's there in database.
You're in luck I have recently struggled trying to find a solution using Google and finally arrived at the SQL statement:
master_table_from_csv CHANGE COLUMN
I discovered that with mysql it is essential to include the field type AND VARCHAR must be all in capitals.
Thanks for the solution but I do not want to permanently change the column names. Just when I doing the query they should return the data with the corrosponding temp. col name but permanently they should stay like they are. How to achieve that ?
answer: use column aliases
SELECT nicename1 AS crapname1
, nicename2 AS crapname2
Exactly what i wanted.