Click to See Complete Forum and Search --> : MySQL Alter


goon12
04-12-2002, 12:18 AM
I need to change the size of a column in a table, and I'm not that great with SQL. I have a column called "email" as varchar(20), and I need that to be a varchar(45) or something.

Can that be done with out blowing away my entire table?

I just got done looking at the mysql.org docs, and I am unsure of the syntax to do this. The table name is user_accounts, and the column name is email ( it's varchar(20) and i need it to be a varchar(40) or so)


Thanks,
goon12

[ 12 April 2002: Message edited by: goon12 ]

chikn
04-12-2002, 05:00 PM
This will do it for a table, so Im not sure hat will for a column, maybe alter column

alter table tablename change Name SomeotherName varchar(30);

goon12
04-12-2002, 10:13 PM
Thanks
I will try it out and let you know how it worked :)