"There Exists"?
I was wondering if there is a way to do a "there exists" in SQL. The application looks kind of like a library. I have a table of books, and a table of the logs (when things were checked in and out and by whom). A book is currently checked out if there exists an entry in the log which has a NULL in the returned field, otherwise, it is checked in. Is there a way to implement this in a query that would get all of the books and whether they are checked in or not, or would it be better to just store an extra bit-field in the book table which is a status bit?
Thanks.
[576 byte] By [
evlich] at [2007-11-11 10:18:28]
