how do I select multiple conditions from 1 table column?

2009-04-01 Thread PJ
I am trying to select all books whose authors last names begin with I, J or K. I have 3 tables: book, author and book_author. The following query works with one condition but not with three. SELECT * FROM book WHERE id IN (SELECT bookID FROM book_author WHERE authID IN (SELECT

Re: how do I select multiple conditions from 1 table column?

2009-04-01 Thread David Giragosian
On Wed, Apr 1, 2009 at 1:27 PM, PJ af.gour...@videotron.ca wrote: I am trying to select all books whose authors last names begin with I, J or K. I have 3 tables: book, author and book_author. The following query works with one condition but not with three. SELECT * FROM book WHERE id

Re: how do I select multiple conditions from 1 table column?

2009-04-01 Thread PJ
David Giragosian wrote: On Wed, Apr 1, 2009 at 1:27 PM, PJ af.gour...@videotron.ca mailto:af.gour...@videotron.ca wrote: I am trying to select all books whose authors last names begin with I, J or K. I have 3 tables: book, author and book_author. The following query