Hi John,

I *think* VARCHAR is *supposed* to work that way, but doesn't in MySQL.
So you'll have to use TINYTEXT.  Its storage requirements are the same
as VARCHAR(255) and it behaves the same way, except for, I think, 3
things: 1) the trailing space thing, obviously; 2) it can't have a
DEFAULT value; and 3) you can't index the whole column -- but you can
INDEX (col(255)), which has the same effect. :-)

Hope that helps.


Matt


----- Original Message -----
From: "John Mistler"
Sent: Friday, April 30, 2004 3:54 AM
Subject: Storing a space


> Is there a way to force an invisible "space" character to be stored at
the
> END of a string in a column (either VARCHAR or CHAR), so that when it
is
> retrieved the space at the end is not cut off?
>
> theString + space
>
> or even,
>
> theString + space + space + space, etc.
>
> Currently, I can only get the string back as theString
>
> Thanks,
>
> John


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to