Tutorial :What is the max length of a varchar (doctrine:string) in Doctrine 2 or SQL?



Question:

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


Solution:1

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


Solution:2

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

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


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »