this is the first time I'm dabbling in Databases and was wondering if it was possible to do the following:
I have two tables 

```
student (id, name, phone)
photos  (id, student_id, photo)

```

I wanted to retrieve the student phone who's name is say 'Tom' but only if he has a photo. 
Is it possible at all to have a condition like this?

Many thanks