Hello.
Yes, may be LIKE operator should check the type of column and remove trailing spaces from the comparsion varchar-string, but in TEXT columns trailing spaces are allowed. Thomas Spahni <[EMAIL PROTECTED]> wrote: > Hi everyone, > > recently I encountered the following problem: > > SELECT COUNT(id) FROM sometable WHERE somevarchar LIKE 'thistext '; > > returned 0 (of course!) because trailing blanks can't exist in a column of > type VARCHAR. > > But: Shouldn't the constant be truncated automatically in this context > before the comparison is made? I can certainly do it in my application but > I think that it would be a consistent behaviour if MySQL would do it. Any > opinions from the list? > > Thomas Spahni > > -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.NET http://www.ensita.net/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Gleb Paharenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.NET <___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]