Re: changing field size
| From: | Christopher Ostmo | Date: | Thu, 21 Jun 2001 21:15:14 +0000 |
| Subject: | Re: changing field size | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-9704@lists.php.net to get a copy of this message | ||
Adv. Systems Design pressed the little lettered thingies in this order...
> hello *:
>
> I have initially set a field named title to be
> varchar(50)...I am finding that it is not long
> enough...can I change the size without adversely
> affecting existing data?
>
ALTER TABLE table_name CHANGE field_name field_name
new_attributes.
For a table called "tbl" and a field called "fld" use:
ALTER TABLE tbl CHANGE fld fld VARCHAR(100)
Increasing the length of the field has no adverse affect.
Have fun...
Christopher Ostmo
a.k.a. tech@AppIdeas.com
AppIdeas.com
Meeting cutting edge dynamic
web site needs
For a good time,
http://www.AppIdeas.com/