> Don't you think you should use
>
> select * from test WHERE a=0 ;
>
> not
>
> select * from test where 0;
>
> Isn't the correct usage of WHERE
Well, usually my queries could look like this:
insert into #report (Line)
select isnull(a.Object, '') + char(9)
+ isnull(c.ClusterId, '
OTECTED]]
> Sent: Tuesday, April 16, 2002 11:07 AM
> To: Mysql List
> Subject: RE: WHERE codition test
>
>
> On 16 Apr 2002, at 10:58, Jon Frisby wrote:
>
> > String literals in a truth test such as you set up are coerced
> to integers.
> > (A la C's '
> Neither I, it seams strange. This value has to be stored in some kind
> of pointer to an object or char * in the program it self. I would first
> assume that the content of the pointer is tested, but that cant be true
> since the content in this case is the number 65.
You're assuming a very low
ysql List; Christopher Thompson
>Subject: RE: WHERE codition test
>
>
>> mysql> select x.a from test x where 1;
>>
>> 1 evaluates to be true, so this should select all rows. And it does.
>>
>> 5 rows in set (0.00 sec)
>>
>> mysql> select * f
On 16 Apr 2002, at 10:58, Jon Frisby wrote:
> String literals in a truth test such as you set up are coerced to integers.
> (A la C's 'atoi()' function.)
[snip]
> If you're used to weakly-typed languages, such as Perl this is fairly
> typical behavior although it does seem counterintuitive in the
side down for me considering
> > that integers apart from zero evaluates to true.
> >
> > Also it seams like this is not ISO SQL, so it could be a bit tricky
> > to predict the outcome without actually having some specification of
> > the behavior.
> >
> > //A
sage-
> From: Svensson, B.A.T. (HKG) [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, April 16, 2002 10:22 AM
> To: Christopher Thompson; Mysql List
> Subject: RE: WHERE codition test
>
>
> Basically I am just curious, and I did perform some few small test.
> But, I was suspecti
tcome without actually having some specification of
> the behavior.
>
> //Anders
>
> > -Original Message-
> > From: Christopher Thompson
> > Sent: Tuesday, April 16, 2002 6:24 PM
> > To: Svensson, B.A.T. (HKG); Mysql List
> > Subject
o: Svensson, B.A.T. (HKG); Mysql List
> Subject: Re: WHERE codition test
>
>
> I'm not sure what you are asking. Everything is working correctly as far as
> I can see.
>
-
Before posting, please
I'm not sure what you are asking. Everything is working correctly as far as
I can see.
On Tuesday 16 April 2002 10:19 am, Svensson, B.A.T. (HKG) wrote:
> Is this a documented behavior of MySQL(?):
>
> mysql> create table test (a int);
> Query OK, 0 rows affected (0.03 sec)
>
> mysql> insert int
Is this a documented behavior of MySQL(?):
mysql> create table test (a int);
Query OK, 0 rows affected (0.03 sec)
mysql> insert into test values(0);
Query OK, 1 row affected (0.00 sec)
mysql> insert into test values(0);
Query OK, 1 row affected (0.00 sec)
mysql> insert into test values(1);
Que
11 matches
Mail list logo