Re: Changing field size
| From: | Yuri Petro | Date: | Sun, 28 Apr 2002 14:20:07 +0000 |
| Subject: | Re: Changing field size | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-94986@lists.php.net to get a copy of this message | ||
"ALTER TABLE works by making a temporary copy of the original table. The
alteration is performed on the copy, then the original table is deleted and
the new one is renamed. This is done in such a way that all updates are
automatically redirected to the new table without any failed updates. While
ALTER TABLE is executing, the original table is readable by other clients.
Updates and writes to the table are stalled until the new table is ready."
http://www.mysql.com/doc/A/L/ALTER_TABLE.html
So, I think your data will be saved.
--
Kind regards,
Yuri.
>>>> www.AceHoster.com <<<< Quality web hosting
"Anthony Rodriguez" <sbwi@bellatlantic.net> ???????/???????? ? ????????
?????????:
news:4.3.2.7.2.20020428090854.00b036e0@mailbox.bellatlantic.net...
> I've a VARCHAR(4) field that I want to change to a VARCHAR(6) field.
>
> What would happen to the existing data in MySQL db?
>
> Thanks!
>
> Tony
> (sbwi@bellatlantic.net)
>