Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2011
    Location
    United Kingdom
    Posts
    2

    Unanswered: Renaming columns generated in query

    Hey guys just have a quick question,

    Is it possible to change the column names generated by a mySql query ?.

    For example I have a MIN(cost) and I want to rename the generated name "MIN(cost)" to say "Minimum Cost"

    I hope I've worded that correctly so that you can understand, I apologise if I haven't.

    Cheers

  2. #2
    Join Date
    Nov 2003
    Posts
    2,933
    Provided Answers: 12
    Code:
    SELECT min(cos) as "Minimum Cost" 
    FROM your_table
    (Note that the usage of the double quotes requires MySQL to run in ANSI mode)

  3. #3
    Join Date
    Jan 2011
    Location
    United Kingdom
    Posts
    2
    That's just what I was looking for, I searched the web but my searches where only giving me "alter" queries.

    Thank you very much !

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •