> I am trying to determine when it is best to use
> varchar and when it is appropriate to use tinytext. I
> have looked at the manual and have read the difference
> between them but would like to have an understanding
> of this in more practical, real-life terms.
>
> Is a space between characters considered a character
> in both column types or does one handle it
> differently?
Yes, it's a character in both; However: a varchar
will strip trailing spaces in a string whereas a
text field will keep it.
> When I use a varchar I have to define its maximum
> length. I don't have to declare max length in
> tinytext. does this make a difference when it comes to
> storage space?
The difference between a varchar and a tinytext is that
a varchar is stored directly in the table data, whereas
the tinytext is stored outside the table. Tinytext fields
can only be indexed in MyISAM tables. Also, you cannot
specify a default value for a tinytext.
/ Carsten
--
Carsten H. Pedersen
keeper and maintainer of the bitbybit.dk MySQL FAQ
http://www.bitbybit.dk/mysqlfaq
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php