Linked Questions
44 questions linked to/from MySQL: Large VARCHAR vs. TEXT?
53 votes
2 answers
76k views
When to use TEXT in mysql instead of VARCHAR [duplicate]
Possible Duplicate: MySQL: Large VARCHAR vs. TEXT? Since VARCHAR can have 65k bytes now, when then should TEXT be used instead of VARCHAR?
1 vote
2 answers
385 views
Which data type for HTML? [duplicate]
I would like to store HTML in my database, what field type would you recommend? VarChar Blob Text The HTML will vary in length depending on the row.
2 votes
0 answers
210 views
Permance using varchar(750) or text [duplicate]
So, I'm building a table to input images. I have an attribute to enter the caption/description of the image. In some cases, i need just a little more than 255 characters for the caption/description, ...
0 votes
1 answer
211 views
Not sure on what length Text field in mysql should have [duplicate]
In my Mysql DB I have a field which is used to store user-inputted text, and therefore set as Text and not varchar. A user can input a maximum of 3000 characters which is then saved into the Text ...
0 votes
1 answer
75 views
MySQL: store rare long string [duplicate]
There is a MySQL table: CREATE TABLE `variables` ( `name` VARCHAR(50) NOT NULL, `value` VARCHAR(250) NOT NULL, PRIMARY KEY (`name`) ) ENGINE=InnoDB CHARSET=utf8mb4; There is only one type ...
983 votes
4 answers
1.1m views
TINYTEXT, TEXT, MEDIUMTEXT, and LONGTEXT maximum storage sizes
Per the MySQL docs, there are four TEXT types: TINYTEXT TEXT MEDIUMTEXT LONGTEXT What is the maximum length that I can store in a column of each data type assuming the character encoding is UTF-8?
502 votes
2 answers
508k views
Difference between VARCHAR and TEXT in MySQL [duplicate]
When we create a table in MySQL with a VARCHAR column, we have to set the length for it. But for TEXT type we don't have to provide the length. What are the differences between VARCHAR and TEXT?
53 votes
3 answers
27k views
VARCHAR vs TEXT in MySQL
I have two fields: one to store an excerpt with a max size of 500 characters, and another to store a description with a max size of 10,000 characters. What data types should I use, TEXT or VARCHAR? ...
18 votes
3 answers
25k views
laravel 4 saving ip address to model
I'm trying to save a user ip address to my database using Laravel 4. I found the following function which returns a string Request::getClientIp() How would I store this in my model? Just a string or ...
15 votes
3 answers
27k views
Is it wise to declare a VARCHAR with a value greater than 255 in MySQL?
I just noticed in the documentation that in versions greater than 5.0.3 of MySQL you can declare varchar's with larger values than 255. In the past I've switched datatypes for anything larger than 255 ...
8 votes
3 answers
20k views
What field TYPE for textarea's?
I have a form where clients will be typing a few paragraphs in various textarea's. Should I choose varchar or text for field type? Does it matter? Thanks. Erik
5 votes
3 answers
14k views
TEXT vs VARCHAR in InnoDB MySQL 5.5. When to use each one
What are the main differences between text and varchar in InnoDB storage engine at MySQL 5.5? Is text or varchar(5000) used if we are talking about a variable text field of not more than 5000 chars?
8 votes
3 answers
10k views
What is the next best thing after VARCHAR(255)
I have a table with about 2 million records in it. I have a field called message which is setup as varchar(160) and I need something bigger that varchar(255) because I need to be able to store about ...
4 votes
5 answers
13k views
What kind of data type should I use for long contents?
I am creating a project that will hold long text.Probably paragraphs...Now what data type should I use for my datatable fields? I am using mySQL workbench...thanks
3 votes
4 answers
11k views
varchar vs text - MySQL
in my project an user can write comment [plain text], and view others comment, can delete own comment, but can not update comment ! In this case which would should i use ? Text or Varchar(4048) ? ...