tags:

views:

36

answers:

2

if i use a string type in doctrine 2 (maps to sql varchar), what is the max length i can use?

A: 

In SQL the max length for VARCHAR is 255, same with TINYTEXT.

Reference: http://dev.mysql.com/doc/refman/5.0/en/char.html

babonk
i shld say thats only in mysql 5.0.3 and below "The length can be specified as a value from 0 to 255 before MySQL 5.0.3, and 0 to 65,535 in 5.0.3 and later versions"
jiewmeng
try storing 256. If it works then 65,535 is the answer
babonk
A: 

MySQL can save 65,535, others have the same limit. Oracle has 4000 as maximum limit (which is the lowest across all vendors!)

beberlei