PDA

View Full Version : Query to expand product description VARCHAR?


Boofo
12-31-2010, 05:18 AM
Does anyone know what query you would run to make expand the product table description column from VARCHAR(250) to VARCHAR(300)? I did it manually in the db, but didn't trust myself enough to do it with a query.

ForumsMods
12-31-2010, 06:44 AM
In MySQL 5.0 and before MySQL 5.0.3, the length is from 0 to 255. And from 0 to 65,535 in MySQL 5.0.3 and later.

Maybe not all users are using 5.0.3 version, so the best option is use BLOB, TEXT, MUTIBLOB or MEDIUMTEXT

Boofo
12-31-2010, 06:56 AM
That is vb's default length and what they use. How could I change that with a query to something that would allow more characters then?

ForumsMods
12-31-2010, 07:34 AM
ALTER TABLE table CHANGE name name VARCHAR(500)
ALTER TABLE table CHANGE name name TEXT
ALTER TABLE table CHANGE name name MEDIUMTEXT