On Mon, 2004-04-26 at 14:59, Matthias Eireiner wrote:
> hi there,
> 
> I have a basic question:
> how can I simplify multiple OR statements in a WHERE clause where I have
> only one column to which I refer?
> 
> e.g. 
> 
> SELECT word FROM word_table WHERE id = 1 OR id = 34 OR id = 78 OR id = 8787
> OR ...

Try 'IN':

  SELECT word FROM word_table WHERE id IN (1, 34, 78, 8787);

> I thought I once read over something like this but I can't find it right
> now. Would be great if somebody could help me out!
> Thanks a lot in advance!
> 
> regards
> 
> Matthias
> 
> 
> _________________________________________
> 
> Matthias Eireiner
> 
> email: [EMAIL PROTECTED]
> 
> www.bvcapital.com
> _________________________________________
> 

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to