RE: simplifying OR clauses

2004-05-02 Thread Matt Chatterley
As others have said, you can use 'IN'. You could also use UNION (although I don't think I would, personally, for quite what you want!): SELECT word FROM word_table WHERE id = 1 UNION SELECT word FROM word_table WHERE id = 2 Etc. Assuming your version of MySQL supports the UNION operator! Another

Re: simplifying OR clauses

2004-04-26 Thread Garth Webb
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

Re: simplifying OR clauses

2004-04-26 Thread Keith C. Ivey
On 26 Apr 2004 at 14:59, Matthias Eireiner wrote: > 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 ... You want the "IN" operator: http:/