Thomas Spahni 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?
What about:
... WHERE LEFT(somevarchar,9) LIKE 'thistext ';
The automatic truncation should not happen in this case...?
--
Roger
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]