> From: Joel Cochran [mailto:[EMAIL PROTECTED] > > Hi Puneet, > > I probably shouldn't have said that they 'ignore' the blanks, but they are > capable of treating them as white space for text matching purposes. I > can't > speak for Oracle, but I'm pretty sure MySQL and SqlServer (and I know for > sure DB2) all allow you to search on 'A' and they will return records for > 'A > ' or 'A ', etc. I think it is intuitive to treat trailing blanks as > whitespace, but that might be because of my main experience with DB2/400.
(Not very SQLite specific, but:) This is a difference between CHAR(n) and VARCHAR(n) in many databases; a VARCHAR knows how many characters are significant (and they can include whitespace), whereas CHAR(n) stores exactly n characters but views trailing blanks as insignificant. CHAR(n) is ugly from most design viewpoints, but can be handled slightly more efficiently in many databases so we accept ugly code to deal with it. I'd definitely recommend removing the trailing blanks when you move away from a schema/database that requires them. -- James ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------