MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Donny Simonton Date:November 7 2004 1:46pm
Subject:RE: mysql NOT operator
View as plain text  
Why would have to write not, when your keyword=a will not return b to begin
with?

But if this was really just an example you would do this.

SELECT data_id from table WHERE keyword = a AND keyword != b

Donny
> -----Original Message-----
> From: L a n a [mailto:q1w3z@stripped]
> Sent: Saturday, November 06, 2004 10:35 PM
> To: mysql@stripped
> Subject: mysql NOT operator
> 
> Hello,
> 
> Could you please tell me how I can write an sql statement in php when I'd
> llike to select boolean search in one field like "except" or "NOT" result.
> What I mean here is that I can execute the following:
> 1.  SELECT data_id from table WHERE keyword = a AND keyword =b
> 2. SELECT data_id from table WHERE keyword = a OR keyword =b
> 
> However, NOT operator gives an error:
> 3. SELECT data_id from table WHERE keyword = a NOT keyword =b ( returns
> sql
> error)
> 
> Could you please help?
> Thank you,
> Lana
> 
> 
> 
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/mysql?unsub=1
> 



Thread
mysql NOT operatorL a n a7 Nov
  • RE: mysql NOT operatorDonny Simonton7 Nov
    • Tricky self join query help?Gerald Taylor10 Nov
      • Re: Tricky self join query help?SGreen10 Nov
        • Re: Tricky self join query help?Gerald Taylor10 Nov
          • Re: Tricky self join query help?Brent Baisley11 Nov
      • Re: Tricky self join query help?Brent Baisley10 Nov
  • Re: mysql NOT operatorFrederic Wenzel7 Nov
Re: mysql NOT operatorJon Stephens7 Nov