List:General Discussion« Previous MessageNext Message »
From:Gerald Clark Date:September 26 2001 8:24pm
Subject:Re: How many OR, AND in a query?
View as plain text  
Well, a column can't be one value AND another value.

Mysql List wrote:

> in() is usefull for OR ing, but is there a way to do this AND ing?
> 
> 
> 
> 
>> You might want to try:
>> 
>> WHERE mycolumn in (1, 3, 23, ...)
>> 
>> Or even better, put your thousand records into a temporary table and then
> 
> just do a join.
> 
>> --jfarr
>> 
>> ----- Original Message -----
>> From: "Mysql List" <mysql_list@stripped>
>> To: "mysql" <mysql@stripped>
>> Sent: Wednesday, September 26, 2001 12:06 PM
>> Subject: How many OR, AND in a query?
>> 
>> 
>> 
>>> Hi,
>>> How many OR or AND can I put in a select query statement?
>>> ex:
>>> " WHERE mycolumn = 1 OR mycolumn = 3 OR mycolumn = 23   etc . . . "
>>> 
>>> A thousand? How would that affect the database execution time?
>>> 
>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> Before posting, please check:
>>>    http://www.mysql.com/manual.php   (the manual)
>>>    http://lists.mysql.com/           (the list archive)
>>> 
>>> To request this thread, e-mail <mysql-thread86421@stripped>
>>> To unsubscribe, e-mail
>> 
> <mysql-unsubscribe-jfarr=real.com@stripped>
> 
>>> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>>> 
>>> 
>> 
> 
> 
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
> 
> To request this thread, e-mail <mysql-thread86430@stripped>
> To unsubscribe, e-mail
> <mysql-unsubscribe-gerald_clark=suppliersystems.com@stripped>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


-- 
Gerald L. Clark
gerald_clark@stripped

Thread
How many OR, AND in a query?Mysql List26 Sep
  • Re: How many OR, AND in a query?Jonothan Farr26 Sep
  • Re: How many OR, AND in a query?Richard Brown26 Sep
  • Re: How many OR, AND in a query?Mysql List26 Sep
  • Re: How many OR, AND in a query?Gerald Clark26 Sep
  • Re: How many OR, AND in a query?Bill TQO Adams26 Sep