> Hi all,
>
> I am writing an application that requires my application to possibly
> update the length of a char field while data is being imported into the
> db. First, can I update the size/type of a column using UPDATE? Would
> someone be willing to give me an example?
You will want to look at the ALTER TABLE syntax.
If you want to change your field from CHAR(10) to CHAR(20) the syntax is:
ALTER TABLE mytable MODIFY mycolumn CHAR(20);
You may also need to tack on NOT NULL and/or PRIMARY KEY or other
modifiers depending on your column as appropriate.
Section 6.5.4 of the docs, one I have bookmarked!
Josh
> thank you
>
> Shaun
>
> filter: mysql
---------------------------------------------------------------------
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