Justtechjobs.com Find a programming school near you






Online Campus Both


php-db | 2001062

Re: [PHP-DB] changing field size From: Christopher Ostmo (tech <email protected>)
Date: 06/21/01

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 <email protected>
AppIdeas.com
Meeting cutting edge dynamic
web site needs

For a good time,
http://www.AppIdeas.com/

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-db-unsubscribe <email protected>
For additional commands, e-mail: php-db-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>