Linked Questions

53 votes
2 answers
76k views

Possible Duplicate: MySQL: Large VARCHAR vs. TEXT? Since VARCHAR can have 65k bytes now, when then should TEXT be used instead of VARCHAR?
enchance's user avatar
  • 30.7k
1 vote
2 answers
385 views

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.
panthro's user avatar
  • 24.2k
2 votes
0 answers
210 views

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, ...
Marco's user avatar
  • 2,745
0 votes
1 answer
211 views

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 ...
user2722667's user avatar
  • 8,733
0 votes
1 answer
75 views

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 ...
androkettle's user avatar
983 votes
4 answers
1.1m views

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?
Lalith B's user avatar
  • 12.4k
502 votes
2 answers
508k views

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?
user3840485's user avatar
  • 5,155
53 votes
3 answers
27k views

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? ...
Mohamad's user avatar
  • 35.4k
18 votes
3 answers
25k views

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 ...
user391986's user avatar
  • 31.2k
15 votes
3 answers
27k views

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 ...
ahanson's user avatar
  • 2,188
8 votes
3 answers
20k views

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
Erik's user avatar
  • 5,801
5 votes
3 answers
14k views

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?
Emilio Nicolás's user avatar
8 votes
3 answers
10k views

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 ...
user1005319's user avatar
4 votes
5 answers
13k views

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
PeterJohn's user avatar
  • 599
3 votes
4 answers
11k views

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) ? ...
Sourav's user avatar
  • 17.6k

15 30 50 per page