At 18:11 -0200 1/21/03, Valdir Stiebe Junior wrote:
> > I'm stlll surprised that NAME = 2 returns anything. When I tried your
>> example, it returned no rows. I get two rows with NAME = 0, nothing
>> with NAME = 2. Are you sure you're not mixing up your test results?
>Sorry, my mistake.
>> NAME = 0 is a string-to-number conversion. MySQL converts the string
>> to a number and performs a numeric comparison. Of your three values,
>> 'ppl1' and 'ppl2' will be converted to 0 (which compares the same as 0),
>> but NULL is still NULL (which does not compare the same as 0).
>Ok, i understand now. This is useful when you have things like '10' or
>'342'. But when you have 'ppl1' isn't deterministic wich number it
Yes, it is. 'ppl1' doesn't begin with digits, so it converts to zero
in numeric context.
> But thanks. I'm studying to understand how MySql works.
>I have another question, will open another thread to it.