Question: I am writing a select statement to fetch some records i am interested in but the `OR` statement should come last in the pecking order and should be there to improve the other conditions specified.

In this statement for instance

```
select * from the_temp where the_temp_club_id = 1 OR 2 OR 3 OR 4 AND the_temp_membership_year=2000 AND the_temp_name='one';

```

all records with any of this `the_temp_club_id` - `the_temp_club_id = 1 OR 2 OR 3 OR 4` are shown,but it shouldn't be that way.Instead,i want the select to show me all the records where `the_temp_name = one` and `the_temp_membership_year=2000` and also show the `the_temp_club_id`.

The select statement should show all the records where `the_temp_name = one` only and the other conditions should be secondary.

Answer: 
you could use `IN` better then `OR`

```
   where the_temp_club_id in ( 1,2,3,4)
   AND the_temp_membership_year=2000 AND the_temp_name='one'

```
Here is [Working example](http://www.sqlfiddle.com/#!2/67037/1)

```
SELECT * FROM THE_TEMP 
  WHERE THE_TEMP_CLUB_ID IN (1, 2, 3,4)
  AND THE_TEMP_MEMBERSHIP_YEAR = 2000 
  AND THE_TEMP_NAME = 'one';

```