Re: Change column names
Mikaela Holmberg a écrit : > > Hi there. > Just recently I have started to investigate a possible future use of > mySql at my company. As part of this investigation I have come across > one seemingly trivial obstacle, but an obstacle very important for me. > What I wonder is if there is no means of renaming a column in a sql > select phrase in mySql? In, par example, Oracle this i simply done with > "SELECT group_id g, time t FROM tbl_Groups"n if the desired outcome is > that the group_id column is presented as "g". > Thankful for any possible answer. > > ___ > Mikaela Holmberg M Sc > Systems Developer > OSIX AB > Lumavägen 6, SE-120 31 Stockholm > Direkt: +46 8 50 600 667 > Mobil: +46 70 597 06 67 > Hi, Have you looked at the manual ? (http://www.mysql.com/doc/S/E/SELECT.html) I think that you can do it with AS keyword: SELECT group_id AS g, time AS t FROM Or am I missing something ? Regards -- Joseph Bueno NetClub/Trader.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Change column names
Hi Mikaela, Just use "SELECT group_id AS g, time AS t FROM tbl_Groups" Simon Original Message: - From: Mikaela Holmberg [EMAIL PROTECTED] Date: Fri, 15 Feb 2002 10:19:07 +0100 To: [EMAIL PROTECTED] Subject: Change column names Hi there. Just recently I have started to investigate a possible future use of mySql at my company. As part of this investigation I have come across one seemingly trivial obstacle, but an obstacle very important for me. What I wonder is if there is no means of renaming a column in a sql select phrase in mySql? In, par example, Oracle this i simply done with "SELECT group_id g, time t FROM tbl_Groups"n if the desired outcome is that the group_id column is presented as "g". Thankful for any possible answer. ___ Mikaela Holmberg M Sc Systems Developer OSIX AB Lumavägen 6, SE-120 31 Stockholm Direkt: +46 8 50 600 667 Mobil: +46 70 597 06 67 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php mail2web - Check your email from the web at http://mail2web.com/ . - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Change column names
Hi there. Just recently I have started to investigate a possible future use of mySql at my company. As part of this investigation I have come across one seemingly trivial obstacle, but an obstacle very important for me. What I wonder is if there is no means of renaming a column in a sql select phrase in mySql? In, par example, Oracle this i simply done with "SELECT group_id g, time t FROM tbl_Groups"n if the desired outcome is that the group_id column is presented as "g". Thankful for any possible answer. ___ Mikaela Holmberg M Sc Systems Developer OSIX AB Lumavägen 6, SE-120 31 Stockholm Direkt: +46 8 50 600 667 Mobil: +46 70 597 06 67 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php