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: 
> 
> The select statement should show all the records where the\_temp\_name = one only and the other conditions should be secondary.
> 
> 
> 

So you want to select all records where `the_temp_name = one` or records with other conditions. You are probably looking for this:

```
SELECT * FROM the_temp 
WHERE the_temp_name='one'
OR
(
  the_temp_club_id IN (1,2,3,4)
  AND
  the_temp_membership_year=2000
)

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

```

Try This