Jump to content

Archived

This topic is now archived and is closed to further replies.

OriginalSunny

Command to change column name

Recommended Posts

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.

Share this post


Link to post
Share on other sites
[!--quoteo(post=351559:date=Mar 4 2006, 06:22 AM:name=OriginalSunny)--][div class=\'quotetop\']QUOTE(OriginalSunny @ Mar 4 2006, 06:22 AM) [snapback]351559[/snapback][/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` ;

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.