How to set a varchar to have unlimited length?
mysql
Solution
`VARCHAR` can store upto 255 chars before MySQL 5.0.3 and 65,535 chars in 5.0.3 and later versions.
To store large data in MySQL database you can use `TEXT`, `MEDIUMTEXT` and `LONGTEXT` data types:
TEXT can store 65,535 characters (approx 64KB)
MEDIUMTEXT = 16,777,215 characters (approx 16 MB)
LONGTEXT = 4,294,967,295 chars (approx 4GB)
Problem
In a MySQL database, how would I set a varchar to have unlimited length, so that I can store long web pages? If not, then what is the Maximum Size? I know about Text Types to store larger strings. Is there any limitations on using test data type which I have to handle?