List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:January 21 2003 8:14pm
Subject:Re: Hi and why
View as plain text  
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
>represent.

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.
>
>Thanks.

Thread
Always need to change to root user when I start the serverAlejandro C. Garrammone21 Jan
  • Re: Always need to change to root user when I start the serverDavid T-G21 Jan
  • re: Always need to change to root user when I start the serverEgor Egorov21 Jan
    • Hi and whyValdir Stiebe Junior21 Jan
      • Re: Hi and whyPaul DuBois21 Jan
    • Re: Hi and whyValdir Stiebe Junior21 Jan
      • Re: Hi and whyPaul DuBois21 Jan
      • RE: Hi and whyDean Harding21 Jan
    • Re: Hi and whyValdir Stiebe Junior21 Jan
    • Re: Hi and whyValdir Stiebe Junior21 Jan
      • Re: Hi and whyPaul DuBois21 Jan
    • Re: Hi and whygerald_clark21 Jan
    • Re: Hi and whyGelu Gogancea21 Jan