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
? And why?
After MySQL 5.0.3 VARCHAR accepts ~65000 characters. But this does not tell why I should use one type and or the other.
I'm reasoning that I should use VARCHAR
for the excerpt because I can assign a size limit, and TEXT
for the description
field as it's larger.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…