Hi, I have some troubles with select from multiple tables. There are 3 tables - books (id, name), borrow_log(id_book, id_user), users(id, name). All i want to do is select books that havent been borrowed by specific user (e.g. "John"). I wonder if it could be done w/o subqueries?
Thanks in advance.
yes it can
however, we don't just hand out homework answers on this site, we make you figure it out
what you want is a LEFT OUTER JOIN, in which you try to find the books john has borrowed, and test for NULL in the WHERE clause, to find the ones he hasn't
that's a bigger hint than healdem gave you
thanks a lot, im just a bit confused thinking about it for a couple o hours....and man. pages werent the right thing to solve it for me