You are here: Re: Can you add/remove fields.. « MySQL Databases « IT news, forums, messages
Re: Can you add/remove fields..

Posted by Andy Jeffries on 09/28/31 11:33

On Thu, 01 Dec 2005 14:43:54 -0600, Khai wrote:
> As I suspected, but what about the removal of any fields? Will that
> maintain the data in the other fields, or does it destroy the whole table?

ALTER TABLE foo DROP bar;

Will only drop the bar column on foo table, leaving all other columns and
tables intact.

Likewise:

ALTER TABLE foo ADD bartext VARCHAR(255);

Will add the column bartext and leave all other columns and tables intact.

Cheers,


Andy


--
Andy Jeffries | gPHPEdit Lead Developer
http://www.gphpedit.org | PHP editor for Gnome 2
http://www.andyjeffries.co.uk | Personal site and photos

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация