Jump to content


Photo

Command to change column name


  • Please log in to reply
1 reply to this topic

#1 OriginalSunny

OriginalSunny
  • Members
  • PipPipPip
  • Advanced Member
  • 95 posts

Posted 04 March 2006 - 11:22 AM

Hi,
I just need to know the command i require to change the column name of a table. The table is called 'products' the column is called 'pic' and the new name i want to change the column to is called 'prodpic'.
Thanks.

#2 SpectralDesign.Net

SpectralDesign.Net
  • Members
  • PipPip
  • Member
  • 15 posts
  • LocationToronto, Ontario

Posted 04 March 2006 - 03:03 PM

[!--quoteo(post=351559:date=Mar 4 2006, 06:22 AM:name=OriginalSunny)--][div class=\'quotetop\']QUOTE(OriginalSunny @ Mar 4 2006, 06:22 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
Hi,
I just need to know the command i require to change the column name of a table. The table is called 'products' the column is called 'pic' and the new name i want to change the column to is called 'prodpic'.
Thanks.
[/quote]

Hey, I know the answer to this one!!!!

ALTER TABLE `products` RENAME `prodpic` ;




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users