Reputation: 23
Hi I've got a variable 'text' within my MYSQL database that gathers something like a status update. I believe this variable has a limit of 200?
Is this something that is already set?
If so what variable would be suitable for both a quick 150 character updates as well as something as long as a 1500 word article if a user wanted to elaborate?
Upvotes: 2
Views: 2276
Reputation: 1
Change
doesn't work for us, we needed to use Modify
:
ALTER TABLE `tablename` MODIFY `colname` VARCHAR( 1500 );
Upvotes: 0
Reputation: 1712
http://dev.mysql.com/doc/refman/5.6/en/string-type-overview.html
VARCHAR
A variable-length string. M represents the maximum column length in characters. The range of M is 0 to 65,535.
TEXT
A TEXT column with a maximum length of 65,535 (216 – 1) characters.
I thinking both VARCHAR(1500) and TEXT(1500) is ok for you.
How do i change it within phpmyadmin to the desired new variable if data is currently present within the present form?
To change data type of a column, I would just use SQL, this work in any tools.
ALTER TABLE `tablename` CHANGE `colname` VARCHAR( 1500 );
Upvotes: 1