I have a table called BookTitle that holds book information. I have an SQL statement that lists all books that have the same value of a book called 'Northern Lights'. The code works but what I want to do is to exclude 'Northern Lights' from the result.
This is the code I have:
FROM BookTitle bt1, BookTitle bt2
WHERE bt1.btName = 'Northern Lights'
AND bt2.value = bt1.value ;
Yes... I think the requirements are quite simple. However... Your modification will return ALL books (even 'Northern Lights'), MULTIPLE times (because of the join to itself). This does NOT fulfill the requirements the OP posted.